]> andersk Git - openssh.git/commitdiff
- (bal) Cygwin lacks setgroups() API. Patch by Corinna Vinschen
authormouring <mouring>
Fri, 27 Apr 2001 02:10:15 +0000 (02:10 +0000)
committermouring <mouring>
Fri, 27 Apr 2001 02:10:15 +0000 (02:10 +0000)
   <vinschen@redhat.com>

ChangeLog
uidswap.c

index bb6d12678da12d3c2fa84f24440bb9ada4e3346f..6814791cb59e22706257df3048708287d8f4c405 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,8 @@
    Vinschen <vinschen@redhat.com>
  - (bal) Add /etc/sysconfig/sshd support to redhat's sshd.init. Patch by
    Pekka Savola <pekkas@netcore.fi>
+ - (bal) Cygwin lacks setgroups() API.  Patch by Corinna Vinschen 
+   <vinschen@redhat.com>
 
 20010425
  - OpenBSD CVS Sync
index 2c43877d68f2519f729e8b1bcc5e8a57aa87a777..3b264cf9e866bb75331ae30eeba5d8c16e86764a 100644 (file)
--- a/uidswap.c
+++ b/uidswap.c
@@ -80,9 +80,11 @@ temporarily_use_uid(struct passwd *pw)
                if (user_groupslen < 0)
                        fatal("getgroups: %.100s", strerror(errno));
        }
+#ifndef HAVE_CYGWIN
        /* Set the effective uid to the given (unprivileged) uid. */
        if (setgroups(user_groupslen, user_groups) < 0)
                fatal("setgroups: %.100s", strerror(errno));
+#endif /* !HAVE_CYWIN */
 #ifndef SAVED_IDS_WORK_WITH_SETEUID
        /* Propagate the privileged gid to all of our gids. */
        if (setgid(getegid()) < 0)
@@ -130,8 +132,10 @@ restore_uid(void)
        setgid(getgid());
 #endif /* SAVED_IDS_WORK_WITH_SETEUID */
 
+#ifndef HAVE_CYGWIN
        if (setgroups(saved_egroupslen, saved_egroups) < 0)
                fatal("setgroups: %.100s", strerror(errno));
+#endif /* !HAVE_CYGWIN */
        temporarily_use_uid_effective = 0;
 }
 
This page took 0.63153 seconds and 5 git commands to generate.