]> Zhao Yanbai Git Server - minix.git/commitdiff
Make initgroups() fail if user has any supplemental groups.
authorBen Gras <ben@minix3.org>
Mon, 13 Feb 2006 15:06:01 +0000 (15:06 +0000)
committerBen Gras <ben@minix3.org>
Mon, 13 Feb 2006 15:06:01 +0000 (15:06 +0000)
lib/other/setgroups.c

index a1f199feb10318e5b22aabba4e255db6e64f8be0..8708c9f6ef382d8cad3375417f207e31e79fd8e2 100644 (file)
@@ -43,8 +43,10 @@ int initgroups(const char *name, gid_t basegid)
        /* Because supplemental groups aren't implemented, this call
         * should fail if the user is in any supplemental groups.
         */
-       if(found)
-               return EINVAL;
+       if(found) {
+               errno = EINVAL;
+               return -1;
+       }
 
        return 0;
 }