Fix TZ & TERM handling for use_login case of rev. 1.24
This commit is contained in:
parent
a9f47835a0
commit
b8f64a3c9b
@ -978,10 +978,11 @@ do_setup_env(char **env, Session *s, const char *shell)
|
|||||||
/* Normal systems set SHELL by default. */
|
/* Normal systems set SHELL by default. */
|
||||||
child_set_env(&env, &envsize, "SHELL", shell);
|
child_set_env(&env, &envsize, "SHELL", shell);
|
||||||
}
|
}
|
||||||
#ifndef HAVE_LOGIN_CAP
|
|
||||||
if (getenv("TZ"))
|
if (getenv("TZ"))
|
||||||
|
#ifdef HAVE_LOGIN_CAP
|
||||||
|
if (options.use_login)
|
||||||
|
#endif /* HAVE_LOGIN_CAP */
|
||||||
child_set_env(&env, &envsize, "TZ", getenv("TZ"));
|
child_set_env(&env, &envsize, "TZ", getenv("TZ"));
|
||||||
#endif /* !HAVE_LOGIN_CAP */
|
|
||||||
|
|
||||||
/* Set custom environment options from RSA authentication. */
|
/* Set custom environment options from RSA authentication. */
|
||||||
if (!options.use_login) {
|
if (!options.use_login) {
|
||||||
@ -1007,10 +1008,11 @@ do_setup_env(char **env, Session *s, const char *shell)
|
|||||||
|
|
||||||
if (s->ttyfd != -1)
|
if (s->ttyfd != -1)
|
||||||
child_set_env(&env, &envsize, "SSH_TTY", s->tty);
|
child_set_env(&env, &envsize, "SSH_TTY", s->tty);
|
||||||
#ifndef HAVE_LOGIN_CAP
|
|
||||||
if (s->term)
|
if (s->term)
|
||||||
|
#ifdef HAVE_LOGIN_CAP
|
||||||
|
if (options.use_login)
|
||||||
|
#endif /* HAVE_LOGIN_CAP */
|
||||||
child_set_env(&env, &envsize, "TERM", s->term);
|
child_set_env(&env, &envsize, "TERM", s->term);
|
||||||
#endif /* !HAVE_LOGIN_CAP */
|
|
||||||
if (s->display)
|
if (s->display)
|
||||||
child_set_env(&env, &envsize, "DISPLAY", s->display);
|
child_set_env(&env, &envsize, "DISPLAY", s->display);
|
||||||
if (original_command)
|
if (original_command)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user