From: Guenter Knauf Date: Wed, 16 Mar 2011 18:30:40 +0000 (+0000) Subject: Added prototype for initgroups(). X-Git-Tag: 2.3.12~215 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=059c3cafd7a83be6f473336957f34288d2086797;p=thirdparty%2Fapache%2Fhttpd.git Added prototype for initgroups(). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082250 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/mpm_common.h b/include/mpm_common.h index fc6ee1c0987..2cd00e19ffc 100644 --- a/include/mpm_common.h +++ b/include/mpm_common.h @@ -199,6 +199,19 @@ AP_DECLARE(uid_t) ap_uname2id(const char *name); AP_DECLARE(gid_t) ap_gname2id(const char *name); #endif +#ifndef HAVE_INITGROUPS +/** + * The initgroups() function initializes the group access list by reading the + * group database /etc/group and using all groups of which user is a member. + * The additional group basegid is also added to the list. + * @param name The user name - must be non-NULL + * @param basegid The basegid to add + * @return returns 0 on success + * @fn int initgroups(const char *name, gid_t basegid) + */ +int initgroups(const char *name, gid_t basegid); +#endif + typedef struct ap_pod_t ap_pod_t; struct ap_pod_t { diff --git a/server/mpm_common.c b/server/mpm_common.c index 044385aa663..abcec7d88f0 100644 --- a/server/mpm_common.c +++ b/server/mpm_common.c @@ -222,7 +222,7 @@ int initgroups(const char *name, gid_t basegid) return setgroups(index, groups); #endif } -#endif /* def NEED_INITGROUPS */ +#endif /* def HAVE_INITGROUPS */ /* standard mpm configuration handling */ const char *ap_pid_fname = NULL;