httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <field...@gbiv.com>
Subject Re: getgrgid
Date Fri, 16 May 2008 23:43:00 GMT
On May 16, 2008, at 3:46 PM, Roy T. Fielding wrote:

> On May 13, 2008, at 12:30 PM, Ruediger Pluem wrote:
>> On 05/13/2008 04:21 AM, fielding@apache.org wrote:
>>>
>>> -        gid = atoi(target_gname);
>>> -        actual_gname = strdup(target_gname);
>>> +        if ((gr = getgrgid(atoi(target_gname))) == NULL) {
>>
>> Don't we need to check if getgrgid is available on the target  
>> platform?
>> As I see from my man page on Linux getgrgid requires <grp.h> which is
>> only included if we have HAVE_GRP_H set.
>
> I guess we do need to check, since we already check for getgrnam.
> I thought both were ubiquitous.
>
> Any idea of what alternatives are available per unix platform?

Never mind -- suexec.c is unusable on any platform that doesn't
have getgrgid and getgrnam.  There is no need to check for it.

Our existing checks for getgrnam are bogus, since they aren't
used in unixd.c, which calls ap_gname2id(arg) without checking
to see if it is defined.  The only platform that seems
to care is mingw32, which forces it to "no" and presumably
doesn't compile unixd or suexec.

....Roy

Mime
View raw message