entry.c (fe590ffe40f49fe09d8275fbf29f0d46c5b99dc7) entry.c (aee3ee66a1820749e6babac841e08e86937cd47d)
1/*
2 * Copyright 1988,1990,1993,1994 by Paul Vixie
3 * All rights reserved
4 */
5
6/*
7 * Copyright (c) 1997 by Internet Software Consortium
8 *

--- 385 unchanged lines hidden (view full) ---

394 }
395 /* If LOGIN_CAP, this is deferred to do_command where the login class
396 * is processed. If !LOGIN_CAP, do it here.
397 */
398#ifndef LOGIN_CAP
399 if (!env_get("HOME", e->envp)) {
400 prev_env = e->envp;
401 len = snprintf(envstr, sizeof(envstr), "HOME=%s", pw->pw_dir);
1/*
2 * Copyright 1988,1990,1993,1994 by Paul Vixie
3 * All rights reserved
4 */
5
6/*
7 * Copyright (c) 1997 by Internet Software Consortium
8 *

--- 385 unchanged lines hidden (view full) ---

394 }
395 /* If LOGIN_CAP, this is deferred to do_command where the login class
396 * is processed. If !LOGIN_CAP, do it here.
397 */
398#ifndef LOGIN_CAP
399 if (!env_get("HOME", e->envp)) {
400 prev_env = e->envp;
401 len = snprintf(envstr, sizeof(envstr), "HOME=%s", pw->pw_dir);
402 if (len < sizeof(envstr))
402 if (len < (int)sizeof(envstr))
403 e->envp = env_set(e->envp, envstr);
403 e->envp = env_set(e->envp, envstr);
404 if (len >= sizeof(envstr) || e->envp == NULL) {
404 if (len >= (int)sizeof(envstr) || e->envp == NULL) {
405 warn("env_set(%s)", envstr);
406 env_free(prev_env);
407 ecode = e_mem;
408 goto eof;
409 }
410 }
411#endif
412 prev_env = e->envp;

--- 317 unchanged lines hidden ---
405 warn("env_set(%s)", envstr);
406 env_free(prev_env);
407 ecode = e_mem;
408 goto eof;
409 }
410 }
411#endif
412 prev_env = e->envp;

--- 317 unchanged lines hidden ---