X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/856ef1b65961ddc5213130db112605bf60e6c746..c374ff7bad9c8be12b66db77d9987965899d2596:/usr/src/usr.bin/login/login.c diff --git a/usr/src/usr.bin/login/login.c b/usr/src/usr.bin/login/login.c index f4d6a973c5..10eb949af6 100644 --- a/usr/src/usr.bin/login/login.c +++ b/usr/src/usr.bin/login/login.c @@ -12,7 +12,7 @@ char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)login.c 5.58 (Berkeley) %G%"; +static char sccsid[] = "@(#)login.c 5.59 (Berkeley) %G%"; #endif /* not lint */ /* @@ -244,10 +244,6 @@ main(argc, argv) else salt = "xx"; - /* if user not super-user, check for disabled logins */ - if (!pwd || pwd->pw_uid) - checknologin(); - /* * Disallow automatic login to root; if not invoked by * root, disallow if the uid's differ. @@ -317,6 +313,10 @@ main(argc, argv) /* paranoia... */ endpwent(); + /* if user not super-user, check for disabled logins */ + if (pwd->pw_uid) + checknologin(); + if (chdir(pwd->pw_dir) < 0) { (void)printf("No directory %s!\n", pwd->pw_dir); if (chdir("/"))