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
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@660756
13f79535-47bb-0310-9956-
ffa450edef68
-*- 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>]
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
/*