aboutsummaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2002-04-20 09:56:10 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2002-04-20 09:56:10 +0000
commita37da82a78fe3787c957677f111d9b7ff9f1e0ef (patch)
tree44e3470e40722a9271b83de3f3e310414203cec2 /crypto
parentb36e10eee65d7c16534e96ccd2bd266061ed8da0 (diff)
Notes
Diffstat (limited to 'crypto')
-rw-r--r--crypto/openssh/session.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/crypto/openssh/session.c b/crypto/openssh/session.c
index e7be40e80935..1a6e3ab1cc02 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)