From 77ba8cbf7ecc66d8c157b5088858923711a5b453 Mon Sep 17 00:00:00 2001 From: downsj Date: Sun, 16 Feb 1997 04:39:07 +0000 Subject: [PATCH] /sbin/nologin implies hushlogin. --- usr.bin/login/login.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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? */ -- 2.20.1