diff options
author | William Djupström <william@deepztream.com> | 2019-03-23 14:00:59 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-03-23 14:00:59 -0500 |
commit | d1598daf209b6804e1131ae43e3a9315a334f553 (patch) | |
tree | 082089a6cd2f032074cfe62c41d61396d9f49bdf /toys | |
parent | 04d4f92f6292cd02c8ddc21424749641545be553 (diff) | |
download | toybox-d1598daf209b6804e1131ae43e3a9315a334f553.tar.gz |
login: clear environment when -p is absent
Diffstat (limited to 'toys')
-rw-r--r-- | toys/other/login.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |