Blame SOURCES/bash-5.0-cve-2019-18276-2.patch

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