version 1.263, 2013/04/17 09:04:09 |
version 1.264, 2013/04/19 01:03:01 |
|
|
safely_chroot(chroot_path, pw->pw_uid); |
safely_chroot(chroot_path, pw->pw_uid); |
free(tmp); |
free(tmp); |
free(chroot_path); |
free(chroot_path); |
|
/* Make sure we don't attempt to chroot again */ |
|
free(options.chroot_directory); |
|
options.chroot_directory = NULL; |
} |
} |
|
|
/* Set UID */ |
/* Set UID */ |
|
|
perror("unable to set user context (setuser)"); |
perror("unable to set user context (setuser)"); |
exit(1); |
exit(1); |
} |
} |
|
} else if (options.chroot_directory != NULL && |
|
strcasecmp(options.chroot_directory, "none") != 0) { |
|
fatal("server lacks privileges to chroot to ChrootDirectory"); |
} |
} |
|
|
if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid) |
if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid) |
fatal("Failed to set uids to %u.", (u_int) pw->pw_uid); |
fatal("Failed to set uids to %u.", (u_int) pw->pw_uid); |
} |
} |