|
Lines 206-213
auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
Link Here
|
| 206 |
goto next_option; |
206 |
goto next_option; |
| 207 |
} |
207 |
} |
| 208 |
cp = "environment=\""; |
208 |
cp = "environment=\""; |
| 209 |
if (options.permit_user_env && |
209 |
if (strncasecmp(opts, cp, strlen(cp)) == 0) { |
| 210 |
strncasecmp(opts, cp, strlen(cp)) == 0) { |
|
|
| 211 |
char *s; |
210 |
char *s; |
| 212 |
struct envstring *new_envstring; |
211 |
struct envstring *new_envstring; |
| 213 |
|
212 |
|
|
Lines 233-245
auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
Link Here
|
| 233 |
goto bad_option; |
232 |
goto bad_option; |
| 234 |
} |
233 |
} |
| 235 |
s[i] = '\0'; |
234 |
s[i] = '\0'; |
| 236 |
auth_debug_add("Adding to environment: %.900s", s); |
|
|
| 237 |
debug("Adding to environment: %.900s", s); |
| 238 |
opts++; |
235 |
opts++; |
| 239 |
new_envstring = xcalloc(1, sizeof(struct envstring)); |
236 |
if (options.permit_user_env) { |
| 240 |
new_envstring->s = s; |
237 |
auth_debug_add("Adding to environment: " |
| 241 |
new_envstring->next = custom_environment; |
238 |
"%.900s", s); |
| 242 |
custom_environment = new_envstring; |
239 |
debug("Adding to environment: %.900s", s); |
|
|
240 |
new_envstring = xcalloc(1, |
| 241 |
sizeof(*new_envstring)); |
| 242 |
new_envstring->s = s; |
| 243 |
new_envstring->next = custom_environment; |
| 244 |
custom_environment = new_envstring; |
| 245 |
s = NULL; |
| 246 |
} |
| 247 |
free(s); |
| 243 |
goto next_option; |
248 |
goto next_option; |
| 244 |
} |
249 |
} |
| 245 |
cp = "from=\""; |
250 |
cp = "from=\""; |