version 1.28, 2007/09/11 23:49:09 |
version 1.29, 2014/09/03 18:55:07 |
|
|
|
|
/* Determine the group to make the owner of the tty. */ |
/* Determine the group to make the owner of the tty. */ |
grp = getgrnam("tty"); |
grp = getgrnam("tty"); |
if (grp) { |
gid = (grp != NULL) ? grp->gr_gid : pw->pw_gid; |
gid = grp->gr_gid; |
mode = (grp != NULL) ? 0622 : 0600; |
mode = S_IRUSR | S_IWUSR | S_IWGRP; |
|
} else { |
|
gid = pw->pw_gid; |
|
mode = S_IRUSR | S_IWUSR | S_IWGRP | S_IWOTH; |
|
} |
|
|
|
/* |
/* |
* Change owner and mode of the tty as required. |
* Change owner and mode of the tty as required. |