Do not pass user-defined environmental variables to /usr/bin/login.
Obtained from: OpenBSD Approved by: green
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user