]> granicus.if.org Git - apache/commitdiff
Added prototype for initgroups().
authorGuenter Knauf <fuankg@apache.org>
Wed, 16 Mar 2011 18:30:40 +0000 (18:30 +0000)
committerGuenter Knauf <fuankg@apache.org>
Wed, 16 Mar 2011 18:30:40 +0000 (18:30 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082250 13f79535-47bb-0310-9956-ffa450edef68

include/mpm_common.h
server/mpm_common.c

index fc6ee1c09875fa1d5878c8810a3d2341fba7dc7a..2cd00e19ffc91a312d739c50c667b88ca768c922 100644 (file)
@@ -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 {
index 044385aa6639dd35c7413e8e5f0103cc9e99c81a..abcec7d88f0782d78f562daf0f77b045aa416ae9 100644 (file)
@@ -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;