]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
agetty: replace perms 660 to 620
authorKarel Zak <kzak@redhat.com>
Wed, 2 Jan 2013 07:23:00 +0000 (08:23 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 2 Jan 2013 07:27:32 +0000 (08:27 +0100)
 ... the default is root:tty 620

Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/login.1
term-utils/agetty.c

index 092213d23c6bff515b6ceb0193b9f61e462a3419..e37e5e68d21a6f3053e4d44839dab435a2db2b2b 100644 (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
index b50644cac246c59b50f8db7e1ee8215fdaee7b16..c9163caa6bd7f7bd62a7fbcfea71573038328abb 100644 (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