Do not pass user-defined environmental variables to /usr/bin/login.

Obtained from:	OpenBSD
Approved by:	green
This commit is contained in:
Jacques Vidrine 2001-12-03 00:51:47 +00:00
parent a043a09da7
commit 1c5093bbbc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=87255

View File

@ -1154,6 +1154,7 @@ do_child(Session *s, const char *command)
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;
@ -1167,6 +1168,7 @@ do_child(Session *s, const char *command)
xfree(ce->s);
xfree(ce);
}
}
snprintf(buf, sizeof buf, "%.50s %d %d",
get_remote_ipaddr(), get_remote_port(), get_local_port());