From: downsj Date: Sun, 16 Feb 1997 04:39:07 +0000 (+0000) Subject: /sbin/nologin implies hushlogin. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=77ba8cbf7ecc66d8c157b5088858923711a5b453;p=openbsd /sbin/nologin implies hushlogin. --- diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c index c628c6d4940..e0825819753 100644 --- a/usr.bin/login/login.c +++ b/usr.bin/login/login.c @@ -1,4 +1,4 @@ -/* $OpenBSD: login.c,v 1.18 1997/02/04 03:39:11 flipk Exp $ */ +/* $OpenBSD: login.c,v 1.19 1997/02/16 04:39:07 downsj Exp $ */ /* $NetBSD: login.c,v 1.13 1996/05/15 23:50:16 jtc Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)login.c 8.4 (Berkeley) 4/2/94"; #endif -static char rcsid[] = "$OpenBSD: login.c,v 1.18 1997/02/04 03:39:11 flipk Exp $"; +static char rcsid[] = "$OpenBSD: login.c,v 1.19 1997/02/16 04:39:07 downsj Exp $"; #endif /* not lint */ /* @@ -372,7 +372,8 @@ main(argc, argv) (void)printf("Logging in with home = \"/\".\n"); } - quietlog = access(_PATH_HUSHLOGIN, F_OK) == 0; + quietlog = ((strcmp(pwd->pw_shell, "/sbin/nologin") == 0) || + (access(_PATH_HUSHLOGIN, F_OK) == 0)); seteuid(0); setegid(0); /* XXX use a saved gid instead? */