From: Karel Zak Date: Wed, 2 Jan 2013 07:23:00 +0000 (+0100) Subject: agetty: replace perms 660 to 620 X-Git-Tag: v2.23-rc1~385 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=91984e938e6f3fa3b5c6c98d6fd6021fff84ebdb;p=thirdparty%2Futil-linux.git agetty: replace perms 660 to 620 ... the default is root:tty 620 Signed-off-by: Karel Zak --- diff --git a/login-utils/login.1 b/login-utils/login.1 index 092213d23c..e37e5e68d2 100644 --- a/login-utils/login.1 +++ b/login-utils/login.1 @@ -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 diff --git a/term-utils/agetty.c b/term-utils/agetty.c index b50644cac2..c9163caa6b 100644 --- a/term-utils/agetty.c +++ b/term-utils/agetty.c @@ -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