From 39816868dea88424493d1efc2b59abb4e016716d Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Mon, 13 Feb 2006 15:06:01 +0000 Subject: [PATCH] Make initgroups() fail if user has any supplemental groups. --- lib/other/setgroups.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/other/setgroups.c b/lib/other/setgroups.c index a1f199feb..8708c9f6e 100644 --- a/lib/other/setgroups.c +++ b/lib/other/setgroups.c @@ -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; }