agetty: replace perms 660 to 620

... the default is root:tty 620

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2013-01-02 08:23:00 +01:00
parent f35336526f
commit 91984e938e
2 changed files with 5 additions and 2 deletions

View File

@ -184,7 +184,10 @@ login failure. The default value is
(string)
.RS 4
The terminal permissions. The default value is
.IR 0600 .
.IR 0600
or
.IR 0620
if tty group is used.
.RE
.PP
.B TTYGROUP

View File

@ -903,7 +903,7 @@ static void open_tty(char *tty, struct termios *tp, struct options *op)
* Linux login(1) will change tty permissions. Use root owner and group
* with permission -rw------- for the period between getty and login.
*/
if (chown(buf, 0, gid) || chmod(buf, (gid ? 0660 : 0600))) {
if (chown(buf, 0, gid) || chmod(buf, (gid ? 0620 : 0600))) {
if (errno == EROFS)
log_warn("%s: %m", buf);
else