summaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2020-04-20 09:31:25 +0000
committerJoe Orton <jorton@apache.org>2020-04-20 09:31:25 +0000
commit8acbc07a956387f8987b962b1d61d2aa63f40d98 (patch)
tree4e034c9daf0138529a2a260e3411cc5e53f056e7 /support
parent156dbb6aafd59f4d3a113fcfa247972a39956765 (diff)
downloadhttpd-8acbc07a956387f8987b962b1d61d2aa63f40d98.tar.gz
* support/suexec.c (main): Report error string after failure from
setgid/initgroups or setuid. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876745 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support')
-rw-r--r--support/suexec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/support/suexec.c b/support/suexec.c
index 8b81eebd37..33e95343ea 100644
--- a/support/suexec.c
+++ b/support/suexec.c
@@ -543,7 +543,8 @@ int main(int argc, char *argv[])
* and setgid() to the target group. If unsuccessful, error out.
*/
if (((setgid(gid)) != 0) || (initgroups(actual_uname, gid) != 0)) {
- log_err("failed to setgid (%lu: %s)\n", (unsigned long)gid, cmd);
+ log_err("failed to setgid/initgroups (%lu: %s): %s\n",
+ (unsigned long)gid, cmd, strerror(errno));
exit(109);
}
@@ -551,7 +552,8 @@ int main(int argc, char *argv[])
* setuid() to the target user. Error out on fail.
*/
if ((setuid(uid)) != 0) {
- log_err("failed to setuid (%lu: %s)\n", (unsigned long)uid, cmd);
+ log_err("failed to setuid (%lu: %s): %s\n",
+ (unsigned long)uid, cmd, strerror(errno));
exit(110);
}