You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rodent of Unusual Size <Ke...@Golux.Com> on 1998/01/28 15:17:48 UTC
[PATCH] suexec 1.2.5, PR#1738
I don't use suexec and don't have time to verify/test this,
but PR#1738 does raise a good point: cwd is being used before
being set. I see no value in how it's being used, either, so I
submit the following patch for perusal by the suexec users..
Note that this is for 1.2, not 1.3.
#ken P-)}
Index: suexec.c
===================================================================
RCS file: /export/home/cvs/apache-1.2/support/suexec.c,v
retrieving revision 1.22.2.2
diff -u -r1.22.2.2 suexec.c
--- suexec.c 1997/09/26 03:11:18 1.22.2.2
+++ suexec.c 1998/01/28 14:11:32
@@ -357,7 +357,7 @@
* and setgid() to the target group. If unsuccessful, error out.
*/
if (((setgid(gid)) != 0) || (initgroups(actual_uname,gid) != 0)) {
- log_err("failed to setgid (%ld: %s/%s)\n", gid, cwd, cmd);
+ log_err("failed to setgid (%ld: %s)\n", gid, cmd);
exit(109);
}
@@ -365,7 +365,7 @@
* setuid() to the target user. Error out on fail.
*/
if ((setuid(uid)) != 0) {
- log_err("failed to setuid (%ld: %s/%s)\n", uid, cwd, cmd);
+ log_err("failed to setuid (%ld: %s)\n", uid, cmd);
exit(110);
}