]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
initgroups
authorJim Jagielski <jim@apache.org>
Sun, 30 Sep 2012 15:48:25 +0000 (15:48 +0000)
committerJim Jagielski <jim@apache.org>
Sun, 30 Sep 2012 15:48:25 +0000 (15:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@1392047 13f79535-47bb-0310-9956-ffa450edef68

include/mpm_common.h
server/mpm_common.c

index 68ead5f7d79734bfb4441a65fc0d7830ace26cff..ab0cc19edc3da558e5419ed4365f469ba38af69d 100644 (file)
@@ -161,6 +161,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
+ * @deffunc int initgroups(const char *name, gid_t basegid)
+ */
+int initgroups(const char *name, gid_t basegid);
+#endif
+
 #define AP_MPM_HARD_LIMITS_FILE APACHE_MPM_DIR "/mpm_default.h"
 
 #ifdef AP_MPM_USES_POD
index 3a961ff0cd9c8db13c02cdf6ebd08c369c1db6d6..215beca3aa21c51e90372e99b7bff26bebda9771 100644 (file)
@@ -453,7 +453,7 @@ int initgroups(const char *name, gid_t basegid)
     return setgroups(index, groups);
 #endif /* def QNX */
 }
-#endif /* def NEED_INITGROUPS */
+#endif /* ndef HAVE_INITGROUPS */
 
 #ifdef AP_MPM_USES_POD