]> git.ipfire.org Git - thirdparty/make.git/commitdiff
Formerly misc.c.~20~
authorRoland McGrath <roland@redhat.com>
Fri, 8 Jan 1993 20:32:36 +0000 (20:32 +0000)
committerRoland McGrath <roland@redhat.com>
Fri, 8 Jan 1993 20:32:36 +0000 (20:32 +0000)
misc.c

diff --git a/misc.c b/misc.c
index 761fca056289bacbe25d8ec60f040dc952f84a34..a954d1507fdbc8184bbb51b6c5a28d2acb244a6f 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -605,10 +605,21 @@ child_access ()
   /* Set both the real and effective UID and GID to the user's.
      They cannot be changed back to make's.  */
 
+#ifndef        HAVE_SETREUID
   if (setuid (user_uid) < 0)
     pfatal_with_name ("child_access: setuid");
+#else
+  if (setreuid (user_uid, user_uid) < 0)
+    pfatal_with_name ("child_access: setreuid");
+#endif
+
+#ifndef        HAVE_SETREGID
   if (setgid (user_gid) < 0)
     pfatal_with_name ("child_access: setgid");
+#else
+  if (setregid (user_gid, user_gid) < 0)
+    pfatal_with_name ("child_access: setregid");
+#endif
 }
 \f
 #ifdef NEED_GET_PATH_MAX