aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacques Vidrine <nectar@FreeBSD.org>2001-12-03 00:54:54 +0000
committerJacques Vidrine <nectar@FreeBSD.org>2001-12-03 00:54:54 +0000
commitcea761ff73fd0ab524ddd62172080a7564e608ae (patch)
treedf49f69a3e40a8b3881f8cd487a7ba5093cc5028
parent7c698237a68106a6a71817e43fcb4f450d72c98e (diff)
downloadsrc-cea761ff73fd0ab524ddd62172080a7564e608ae.tar.gz
src-cea761ff73fd0ab524ddd62172080a7564e608ae.zip
MFC 1.18: Do not pass user-defined environmental variables to /usr/bin/login.
Notes
Notes: svn path=/releng/4.3/; revision=87256
-rw-r--r--crypto/openssh/session.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/openssh/session.c b/crypto/openssh/session.c
index 300dc5a2fa1a..f429d8deccf1 100644
--- a/crypto/openssh/session.c
+++ b/crypto/openssh/session.c
@@ -1118,6 +1118,7 @@ do_child(const char *command, struct passwd * pw, const char *term,
child_set_env(&env, &envsize, "TZ", getenv("TZ"));
/* Set custom environment options from RSA authentication. */
+ if (!options.use_login) {
while (custom_environment) {
struct envstring *ce = custom_environment;
char *s = ce->s;
@@ -1131,6 +1132,7 @@ do_child(const char *command, struct passwd * pw, const char *term,
xfree(ce->s);
xfree(ce);
}
+ }
snprintf(buf, sizeof buf, "%.50s %d %d",
get_remote_ipaddr(), get_remote_port(), get_local_port());