r23576: Fix some confusion between HAVE_BROKEN_GETGROUPS and USE_BSD_SETGROUPS.
authorJames Peach <jpeach@samba.org>
Thu, 21 Jun 2007 21:17:06 +0000 (21:17 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:23:31 +0000 (12:23 -0500)
source/lib/system.c

index 9f62ce760af3e3688b2ac7a429b64a7a352318f8..3e9674d9d4eee2f6bbd6046c85538a808fa1930d 100644 (file)
@@ -1022,7 +1022,7 @@ static int sys_bsd_setgroups(gid_t primary_gid, int setlen, const gid_t *gidset)
                setlen = max;
        }
 
-#if defined(BROKEN_GETGROUPS)
+#if defined(HAVE_BROKEN_GETGROUPS)
        ret = sys_broken_setgroups(setlen, new_gidset ? new_gidset : gidset);
 #else
        ret = setgroups(setlen, new_gidset ? new_gidset : gidset);
@@ -1063,10 +1063,10 @@ int sys_setgroups(gid_t UNUSED(primary_gid), int setlen, gid_t *gidset)
        return -1;
 #endif /* HAVE_SETGROUPS */
 
-#if defined(HAVE_BROKEN_GETGROUPS)
-       return sys_broken_setgroups(setlen, gidset);
-#elif defined(USE_BSD_SETGROUPS)
+#if defined(USE_BSD_SETGROUPS)
        return sys_bsd_setgroups(primary_gid, setlen, gidset);
+#elif defined(HAVE_BROKEN_GETGROUPS)
+       return sys_broken_setgroups(setlen, gidset);
 #else
        return setgroups(setlen, gidset);
 #endif