summaryrefslogtreecommitdiff
path: root/loginutils/login.c
diff options
context:
space:
mode:
Diffstat (limited to 'loginutils/login.c')
-rw-r--r--loginutils/login.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/loginutils/login.c b/loginutils/login.c
index cac4349..3322381 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -564,7 +564,9 @@ int login_main(int argc UNUSED_PARAM, char **argv)
change_identity(pw);
setup_environment(pw->pw_shell,
- (!(opt & LOGIN_OPT_p) * SETUP_ENV_CLEARENV) + SETUP_ENV_CHANGEENV,
+ (!(opt & LOGIN_OPT_p) * SETUP_ENV_CLEARENV)
+ + SETUP_ENV_CHANGEENV
+ + SETUP_ENV_CHDIR,
pw);
#if ENABLE_PAM