Commit 5342df2d authored by Niels Möller's avatar Niels Möller
Browse files

(SYSTEM_GROUP): New macro.

(pty_check_permissions): If there's no "tty" group, try "system".

Rev: src/server_pty.c:1.28
parent e25964d6
......@@ -89,6 +89,9 @@ make_pty_info(void)
#ifndef TTY_GROUP
#define TTY_GROUP "tty"
#endif
#ifndef SYSTEM_GROUP
#define SYSTEM_GROUP "system"
#endif
#ifndef ACCESSPERMS
#define ACCESSPERMS 07777
......@@ -116,6 +119,10 @@ pty_check_permissions(const char *name, uid_t user)
/* Points to static area */
grp = getgrnam(TTY_GROUP);
if (!grp)
/* On AIX, tty:s have group "system", not "tty" */
grp = getgrnam(SYSTEM_GROUP);
if (grp)
tty_gid = grp->gr_gid;
else
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment