diff options
-rw-r--r-- | usr.bin/login/login.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c index 39d84a9..fc21783 100644 --- a/usr.bin/login/login.c +++ b/usr.bin/login/login.c @@ -535,7 +535,7 @@ main(argc, argv) if (login_getcapbool(lc, "requirehome", !rootlogin)) refused("Home directory not available", "HOMEDIR", 1); #endif - if (chdir("/") < 0) { + if (chdir("/") < 0) refused("Cannot find root directory", "ROOTDIR", 1); pwd->pw_dir = "/"; if (!quietlog || *pwd->pw_dir) @@ -567,7 +567,6 @@ main(argc, argv) } else if (pwd->pw_change - tp.tv_sec < warntime && !quietlog) (void)printf("Warning: your password expires on %s", ctime(&pwd->pw_change)); - } } #ifdef LOGIN_CAP |