version 1.238, 2008/05/09 16:16:06 |
version 1.239, 2008/06/14 18:33:43 |
|
|
char *argv[ARGV_MAX]; |
char *argv[ARGV_MAX]; |
const char *shell, *shell0, *hostname = NULL; |
const char *shell, *shell0, *hostname = NULL; |
struct passwd *pw = s->pw; |
struct passwd *pw = s->pw; |
|
int r = 0; |
|
|
/* remove hostkey from the child's memory */ |
/* remove hostkey from the child's memory */ |
destroy_sensitive_data(); |
destroy_sensitive_data(); |
|
|
|
|
/* Change current directory to the user's home directory. */ |
/* Change current directory to the user's home directory. */ |
if (chdir(pw->pw_dir) < 0) { |
if (chdir(pw->pw_dir) < 0) { |
fprintf(stderr, "Could not chdir to home directory %s: %s\n", |
/* Suppress missing homedir warning for chroot case */ |
pw->pw_dir, strerror(errno)); |
r = login_getcapbool(lc, "requirehome", 0); |
if (login_getcapbool(lc, "requirehome", 0)) |
if (r || options.chroot_directory == NULL) |
|
fprintf(stderr, "Could not chdir to home " |
|
"directory %s: %s\n", pw->pw_dir, |
|
strerror(errno)); |
|
if (r) |
exit(1); |
exit(1); |
} |
} |
|
|