diff options
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 27 |
1 files changed, 15 insertions, 12 deletions
@@ -33,7 +33,7 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include "includes.h" | 35 | #include "includes.h" |
36 | RCSID("$OpenBSD: session.c,v 1.108 2001/10/11 13:45:21 markus Exp $"); | 36 | RCSID("$OpenBSD: session.c,v 1.110 2001/12/01 21:41:48 markus Exp $"); |
37 | 37 | ||
38 | #include "ssh.h" | 38 | #include "ssh.h" |
39 | #include "ssh1.h" | 39 | #include "ssh1.h" |
@@ -1247,18 +1247,21 @@ do_child(Session *s, const char *command) | |||
1247 | child_set_env(&env, &envsize, "TZ", getenv("TZ")); | 1247 | child_set_env(&env, &envsize, "TZ", getenv("TZ")); |
1248 | 1248 | ||
1249 | /* Set custom environment options from RSA authentication. */ | 1249 | /* Set custom environment options from RSA authentication. */ |
1250 | while (custom_environment) { | 1250 | if (!options.use_login) { |
1251 | struct envstring *ce = custom_environment; | 1251 | while (custom_environment) { |
1252 | char *s = ce->s; | 1252 | struct envstring *ce = custom_environment; |
1253 | int i; | 1253 | char *s = ce->s; |
1254 | for (i = 0; s[i] != '=' && s[i]; i++); | 1254 | int i; |
1255 | if (s[i] == '=') { | 1255 | for (i = 0; s[i] != '=' && s[i]; i++) |
1256 | s[i] = 0; | 1256 | ; |
1257 | child_set_env(&env, &envsize, s, s + i + 1); | 1257 | if (s[i] == '=') { |
1258 | s[i] = 0; | ||
1259 | child_set_env(&env, &envsize, s, s + i + 1); | ||
1260 | } | ||
1261 | custom_environment = ce->next; | ||
1262 | xfree(ce->s); | ||
1263 | xfree(ce); | ||
1258 | } | 1264 | } |
1259 | custom_environment = ce->next; | ||
1260 | xfree(ce->s); | ||
1261 | xfree(ce); | ||
1262 | } | 1265 | } |
1263 | 1266 | ||
1264 | snprintf(buf, sizeof buf, "%.50s %d %d", | 1267 | snprintf(buf, sizeof buf, "%.50s %d %d", |