diff options
author | ache <ache@FreeBSD.org> | 2002-04-20 09:56:10 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2002-04-20 09:56:10 +0000 |
commit | b8f64a3c9b3bd7bb19b93441339b8b098c625b2d (patch) | |
tree | 44e3470e40722a9271b83de3f3e310414203cec2 /crypto | |
parent | a9f47835a092aeed527114bab11b759e9ac4410a (diff) | |
download | FreeBSD-src-b8f64a3c9b3bd7bb19b93441339b8b098c625b2d.zip FreeBSD-src-b8f64a3c9b3bd7bb19b93441339b8b098c625b2d.tar.gz |
Fix TZ & TERM handling for use_login case of rev. 1.24
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/openssh/session.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/crypto/openssh/session.c b/crypto/openssh/session.c index e7be40e..1a6e3ab 100644 --- a/crypto/openssh/session.c +++ b/crypto/openssh/session.c @@ -978,10 +978,11 @@ do_setup_env(char **env, Session *s, const char *shell) /* Normal systems set SHELL by default. */ child_set_env(&env, &envsize, "SHELL", shell); } -#ifndef HAVE_LOGIN_CAP if (getenv("TZ")) +#ifdef HAVE_LOGIN_CAP + if (options.use_login) +#endif /* HAVE_LOGIN_CAP */ child_set_env(&env, &envsize, "TZ", getenv("TZ")); -#endif /* !HAVE_LOGIN_CAP */ /* Set custom environment options from RSA authentication. */ if (!options.use_login) { @@ -1007,10 +1008,11 @@ do_setup_env(char **env, Session *s, const char *shell) if (s->ttyfd != -1) child_set_env(&env, &envsize, "SSH_TTY", s->tty); -#ifndef HAVE_LOGIN_CAP if (s->term) +#ifdef HAVE_LOGIN_CAP + if (options.use_login) +#endif /* HAVE_LOGIN_CAP */ child_set_env(&env, &envsize, "TERM", s->term); -#endif /* !HAVE_LOGIN_CAP */ if (s->display) child_set_env(&env, &envsize, "DISPLAY", s->display); if (original_command) |