On 05/13/2008 04:21 AM, [EMAIL PROTECTED] wrote:
Author: fielding
Date: Mon May 12 19:21:33 2008
New Revision: 655711

URL: http://svn.apache.org/viewvc?rev=655711&view=rev
Log:
When group is given as a numeric gid, validate it by looking up the
actual group name such that the name can be used in log entries.

PR: 7862
Submitted by: <y-koga apache.or.jp>, Leif W <warp-9.9 usa.net>

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/support/suexec.c

Modified: httpd/httpd/trunk/CHANGES
URL: 
http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=655711&r1=655710&r2=655711&view=diff
 > Modified: httpd/httpd/trunk/support/suexec.c
URL: 
http://svn.apache.org/viewvc/httpd/httpd/trunk/support/suexec.c?rev=655711&r1=655710&r2=655711&view=diff
==============================================================================
--- httpd/httpd/trunk/support/suexec.c (original)
+++ httpd/httpd/trunk/support/suexec.c Mon May 12 19:21:33 2008
@@ -395,13 +395,15 @@
             log_err("invalid target group name: (%s)\n", target_gname);
             exit(106);
         }
-        gid = gr->gr_gid;
-        actual_gname = strdup(gr->gr_name);
     }
     else {
-        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.

Regards

RĂ¼diger

  • Re: svn commit: r655711 - in /httpd/httpd/trunk: CHANGES s... Ruediger Pluem

Reply via email to