diff options
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1035,7 +1035,14 @@ main(int ac, char **av) | |||
1035 | (S_ISDIR(st.st_mode) == 0)) | 1035 | (S_ISDIR(st.st_mode) == 0)) |
1036 | fatal("Missing privilege separation directory: %s", | 1036 | fatal("Missing privilege separation directory: %s", |
1037 | _PATH_PRIVSEP_CHROOT_DIR); | 1037 | _PATH_PRIVSEP_CHROOT_DIR); |
1038 | |||
1039 | #ifdef HAVE_CYGWIN | ||
1040 | if (check_ntsec(_PATH_PRIVSEP_CHROOT_DIR) && | ||
1041 | (st.st_uid != getuid () || | ||
1042 | (st.st_mode & (S_IWGRP|S_IWOTH)) != 0)) | ||
1043 | #else | ||
1038 | if (st.st_uid != 0 || (st.st_mode & (S_IWGRP|S_IWOTH)) != 0) | 1044 | if (st.st_uid != 0 || (st.st_mode & (S_IWGRP|S_IWOTH)) != 0) |
1045 | #endif | ||
1039 | fatal("Bad owner or mode for %s", | 1046 | fatal("Bad owner or mode for %s", |
1040 | _PATH_PRIVSEP_CHROOT_DIR); | 1047 | _PATH_PRIVSEP_CHROOT_DIR); |
1041 | } | 1048 | } |