]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
- (bal) Cygwin uid0 fix by vinschen@redhat.com
authorBen Lindstrom <mouring@eviladmin.org>
Thu, 27 Jun 2002 18:02:21 +0000 (18:02 +0000)
committerBen Lindstrom <mouring@eviladmin.org>
Thu, 27 Jun 2002 18:02:21 +0000 (18:02 +0000)
ChangeLog
sshd.c

index 273b2abf7dae8728dbfad1901d9611c604c3fb93..eeaf7c7b70d902a1f28fdfa7bb1d8abde1c0a844 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 20020628
  - (stevesk) [sshd_config] PAMAuthenticationViaKbdInt no; commented
    options should contain default value.  from solar.
+ - (bal) Cygwin uid0 fix by vinschen@redhat.com
 
 200206027
  - OpenBSD CVS Sync
  - (stevesk) entropy.c: typo in debug message
  - (djm) ssh-keygen -i needs seeded RNG; report from markus@
 
-$Id: ChangeLog,v 1.2308 2002/06/27 16:59:50 stevesk Exp $
+$Id: ChangeLog,v 1.2309 2002/06/27 18:02:21 mouring Exp $
diff --git a/sshd.c b/sshd.c
index 851fad4be04cb29da8073fdbcadc196d446e7dc9..d2524c4bc2128d15fd22e7208d61b5918bac6633 100644 (file)
--- a/sshd.c
+++ b/sshd.c
@@ -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);
        }