On Mon, Nov 22, 2010 at 12:39 AM, Guenter Knauf <[email protected]> wrote: > Hi, > in mpm_common.c we have: > > #ifndef HAVE_INITGROUPS > int initgroups(const char *name, gid_t basegid) > { > #if defined(_OSD_POSIX) || defined(OS2) || defined(WIN32) || > defined(NETWARE) > return 0; > #else > gid_t groups[NGROUPS_MAX]; > struct group *g; > int index = 0; > > setgrent(); > > groups[index++] = basegid; > > while (index < NGROUPS_MAX && ((g = getgrent()) != NULL)) { > if (g->gr_gid != basegid) { > char **names; > > for (names = g->gr_mem; *names != NULL; ++names) { > if (!strcmp(*names, name)) > groups[index++] = g->gr_gid; > } > } > } > > endgrent(); > > return setgroups(index, groups); > #endif > } > #endif /* def NEED_INITGROUPS */ > > the only other 2 source files which use initgroups() are mod_unixd.c and > suexec.c; with 4 platforms this function is a dummy; 2 (NetWare and Win32) > dont build mod_unix.d.c, and OS/2 does #ifndef the part in mod_unixd.c where > initgroups() is used - remains only _OSD_POSIX which might need the dummy + > any other strange Linux which lacks of initgroups(); then we have also no > conditional prototype for it in any header; and finally suexec.c is a > standalone program which seems not to be able to use this function unless > linked with mpm_common.c ... > so wouldnt it make more sense to either move it into a separare file which > can be linked to suexec too, or at least to move it into unixd.c or > mod_unixd.c ?
I suggest just deleting the function. In the event that somebody actually needs it, we find the appropriate solution then.
