aboutsummaryrefslogtreecommitdiff
path: root/loginutils/login.c
diff options
context:
space:
mode:
Diffstat (limited to 'loginutils/login.c')
-rw-r--r--loginutils/login.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/loginutils/login.c b/loginutils/login.c
index 078cd68ed..88ed0af78 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -201,7 +201,7 @@ int login_main(int argc UNUSED_PARAM, char **argv)
};
char *fromhost;
char username[USERNAME_SIZE];
- const char *tmp;
+ const char *shell;
int run_by_root;
unsigned opt;
int count = 0;
@@ -389,10 +389,10 @@ int login_main(int argc UNUSED_PARAM, char **argv)
run_login_script(pw, full_tty);
change_identity(pw);
- tmp = pw->pw_shell;
- if (!tmp || !*tmp)
- tmp = DEFAULT_SHELL;
- setup_environment(tmp,
+ shell = pw->pw_shell;
+ if (!shell || !shell[0])
+ shell = DEFAULT_SHELL;
+ setup_environment(shell,
(!(opt & LOGIN_OPT_p) * SETUP_ENV_CLEARENV) + SETUP_ENV_CHANGEENV,
pw);
@@ -427,7 +427,7 @@ int login_main(int argc UNUSED_PARAM, char **argv)
signal(SIGINT, SIG_DFL);
/* Exec login shell with no additional parameters */
- run_shell(tmp, 1, NULL, NULL);
+ run_shell(shell, 1, NULL, NULL);
/* return EXIT_FAILURE; - not reached */
}