nalika / rpms / bash

Forked from rpms/bash 2 years ago
Clone
3907ef
diff --git a/configure.ac b/configure.ac
3907ef
index e5162c4..b82a33b 100644
3907ef
--- a/configure.ac
3907ef
+++ b/configure.ac
3907ef
@@ -799,10 +799,13 @@ AC_CHECK_DECLS([confstr])
3907ef
 AC_CHECK_DECLS([printf])
3907ef
 AC_CHECK_DECLS([sbrk])
3907ef
 AC_CHECK_DECLS([setregid])
3907ef
-AC_CHECK_DECLS[(setresuid, setresgid])
3907ef
+dnl AC_CHECK_DECLS[(setresuid])
3907ef
+dnl AC_CHECK_DECLS[(setresgid])
3907ef
 AC_CHECK_DECLS([strcpy])
3907ef
 AC_CHECK_DECLS([strsignal])
3907ef
 
3907ef
+AC_CHECK_FUNCS(setresuid setresgid)
3907ef
+
3907ef
 dnl Extra test to detect the horribly broken HP/UX 11.00 strtold(3)
3907ef
 AC_CHECK_DECLS([strtold], [
3907ef
     AC_MSG_CHECKING([for broken strtold])
3907ef
diff --git a/shell.c b/shell.c
3907ef
index 484d8a9..5c24922 100644
3907ef
--- a/shell.c
3907ef
+++ b/shell.c
3907ef
@@ -1286,7 +1286,7 @@ disable_priv_mode ()
3907ef
 {
3907ef
   int e;
3907ef
 
3907ef
-#if HAVE_DECL_SETRESUID
3907ef
+#if HAVE_SETRESUID
3907ef
   if (setresuid (current_user.uid, current_user.uid, current_user.uid) < 0)
3907ef
 #else
3907ef
   if (setuid (current_user.uid) < 0)
3907ef
@@ -1299,7 +1299,7 @@ disable_priv_mode ()
3907ef
 	exit (e);
3907ef
 #endif
3907ef
     }
3907ef
-#if HAVE_DECL_SETRESGID
3907ef
+#if HAVE_SETRESGID
3907ef
   if (setresgid (current_user.gid, current_user.gid, current_user.gid) < 0)
3907ef
 #else
3907ef
   if (setgid (current_user.gid) < 0)