You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by fi...@apache.org on 2008/05/28 01:10:48 UTC
svn commit: r660756 - in /httpd/httpd/branches/2.2.x: CHANGES
support/suexec.c
Author: fielding
Date: Tue May 27 16:10:47 2008
New Revision: 660756
URL: http://svn.apache.org/viewvc?rev=660756&view=rev
Log:
Backport r655711
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>
Reviewed by: fielding, jim, rpluem
Modified:
httpd/httpd/branches/2.2.x/CHANGES
httpd/httpd/branches/2.2.x/support/suexec.c (contents, props changed)
Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=660756&r1=660755&r2=660756&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Tue May 27 16:10:47 2008
@@ -1,6 +1,10 @@
-*- coding: utf-8 -*-
Changes with Apache 2.2.9
+ *) suexec: 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 [<y-koga apache.or.jp>, Leif W <warp-9.9 usa.net>]
+
*) Fix garbled TRACE response on EBCDIC platforms.
[David Jones <oscaremma gmail.com>]
Modified: httpd/httpd/branches/2.2.x/support/suexec.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/support/suexec.c?rev=660756&r1=660755&r2=660756&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/support/suexec.c (original)
+++ httpd/httpd/branches/2.2.x/support/suexec.c Tue May 27 16:10:47 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) {
+ log_err("invalid target group id: (%s)\n", target_gname);
+ exit(106);
+ }
}
+ gid = gr->gr_gid;
+ actual_gname = strdup(gr->gr_name);
#ifdef _OSD_POSIX
/*
Propchange: httpd/httpd/branches/2.2.x/support/suexec.c
------------------------------------------------------------------------------
svn:mergeinfo = /httpd/httpd/trunk/support/suexec.c:655711