From d1598daf209b6804e1131ae43e3a9315a334f553 Mon Sep 17 00:00:00 2001 From: William Djupström Date: Sat, 23 Mar 2019 14:00:59 -0500 Subject: login: clear environment when -p is absent --- toys/other/login.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/other') diff --git a/toys/other/login.c b/toys/other/login.c index 9bd6cc95..5214b937 100644 --- a/toys/other/login.c +++ b/toys/other/login.c @@ -119,7 +119,7 @@ void login_main(void) if (fchown(tty, pwd->pw_uid, pwd->pw_gid) || fchmod(tty, 0600)) printf("can't claim tty"); xsetuser(pwd); - reset_env(pwd, FLAG(p)); + reset_env(pwd, !FLAG(p)); // Message of the day if ((ss = readfile("/etc/motd", 0, 0))) puts(ss); -- cgit v1.2.3