#endif
/*
- * Emulate seteuid() for HP-UX via setresuid(2) and seteuid(2) for others.
+ * Emulate sete[ug]id() via setres[ug]id(2) or setre[ug]id(2)
*/
#ifndef HAVE_SETEUID
# ifdef __hpux
# define seteuid(_EUID) (setreuid((uid_t) -1, _EUID))
# endif /* __hpux */
#endif /* HAVE_SETEUID */
+#ifndef HAVE_SETEGID
+# ifdef __hpux
+# define setegid(_EGID) (setresgid((gid_t) -1, _EGID, (gid_t) -1))
+# else
+# define setegid(_EGID) (setregid((gid_t) -1, _EGID))
+# endif /* __hpux */
+#endif /* HAVE_SETEGID */
/*
* Emulate setreuid() for HP-UX via setresuid(2)
/* Define if you have setreuid(3). */
#undef HAVE_SETREUID
+/* Define if you have setegid(3). */
+#undef HAVE_SETEGID
+
/* Define if you have waitpid(2). */
#undef HAVE_WAITPID
;;
esac
-for ac_func in strchr strrchr memchr memcpy memset sysconf sigaction tzset seteuid strftime setrlimit initgroups fstat
+for ac_func in strchr strrchr memchr memcpy memset sysconf sigaction tzset seteuid setegig strftime setrlimit initgroups fstat
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:5637: checking for $ac_func" >&5
dnl
dnl Function checks
dnl
-AC_CHECK_FUNCS(strchr strrchr memchr memcpy memset sysconf sigaction tzset seteuid strftime setrlimit initgroups fstat)
+AC_CHECK_FUNCS(strchr strrchr memchr memcpy memset sysconf sigaction tzset seteuid setegig strftime setrlimit initgroups fstat)
if test -z "$BROKEN_SETREUID"; then
AC_CHECK_FUNCS(setreuid)
fi