aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Djupström <william@deepztream.com>2019-03-23 14:00:59 -0500
committerRob Landley <rob@landley.net>2019-03-23 14:00:59 -0500
commitd1598daf209b6804e1131ae43e3a9315a334f553 (patch)
tree082089a6cd2f032074cfe62c41d61396d9f49bdf
parent04d4f92f6292cd02c8ddc21424749641545be553 (diff)
downloadtoybox-d1598daf209b6804e1131ae43e3a9315a334f553.tar.gz
login: clear environment when -p is absent
-rw-r--r--toys/other/login.c2
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);