diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2002-06-27 18:02:21 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2002-06-27 18:02:21 +0000 |
commit | 596273516c67cfded71acee848de6db4daa41a1a (patch) | |
tree | 0af208ac60edc413019c6e0b3bd168f6d249a720 /sshd.c | |
parent | bdf3e89f1a6d9697c627660cb5ae9828c89ce8f7 (diff) | |
download | openssh-git-596273516c67cfded71acee848de6db4daa41a1a.tar.gz |
- (bal) Cygwin uid0 fix by vinschen@redhat.com
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) (S_ISDIR(st.st_mode) == 0)) fatal("Missing privilege separation directory: %s", _PATH_PRIVSEP_CHROOT_DIR); + +#ifdef HAVE_CYGWIN + if (check_ntsec(_PATH_PRIVSEP_CHROOT_DIR) && + (st.st_uid != getuid () || + (st.st_mode & (S_IWGRP|S_IWOTH)) != 0)) +#else if (st.st_uid != 0 || (st.st_mode & (S_IWGRP|S_IWOTH)) != 0) +#endif fatal("Bad owner or mode for %s", _PATH_PRIVSEP_CHROOT_DIR); } |