]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* support/suexec.c (main): Report error string after failure from
authorJoe Orton <jorton@apache.org>
Mon, 20 Apr 2020 09:31:25 +0000 (09:31 +0000)
committerJoe Orton <jorton@apache.org>
Mon, 20 Apr 2020 09:31:25 +0000 (09:31 +0000)
  setgid/initgroups or setuid.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876745 13f79535-47bb-0310-9956-ffa450edef68

support/suexec.c

index 8b81eebd373bed5f806aa1ce6eeb5e623f3d35c6..33e95343ea65f902981c3fc8506d9fb7b97ec1f9 100644 (file)
@@ -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);
     }