/* Pathname to the Unbound configuration file */
#undef CONFIGFILE
+/* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work
+ */
+#undef DARWIN_BROKEN_SETREUID
+
/* Define if you want to use debug lock checking (slow). */
#undef ENABLE_LOCK_CHECKS
done
+# check if setreuid en setregid fail, on MacOSX10.4(darwin8).
+if echo $build_os | grep darwin8 > /dev/null; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DARWIN_BROKEN_SETREUID 1
+_ACEOF
+
+fi
+
# check mkdir
{ echo "$as_me:$LINENO: checking whether mkdir has one arg" >&5
echo $ECHO_N "checking whether mkdir has one arg... $ECHO_C" >&6; }
fi
AC_CHECK_FUNCS([tzset sigprocmask fcntl getpwnam getrlimit setsid sbrk chroot kill sleep usleep random srandom recvmsg sendmsg writev setresuid setreuid setresgid setregid])
+# check if setreuid en setregid fail, on MacOSX10.4(darwin8).
+if echo $build_os | grep darwin8 > /dev/null; then
+ AC_DEFINE(DARWIN_BROKEN_SETREUID, 1, [Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work])
+fi
+
# check mkdir
AC_MSG_CHECKING([whether mkdir has one arg])
AC_TRY_COMPILE([
if(cfg->username && cfg->username[0]) {
#ifdef HAVE_SETRESGID
if(setresgid(gid,gid,gid) != 0)
-#elif defined(HAVE_SETREGID)
+#elif defined(HAVE_SETREGID) && !defined(DARWIN_BROKEN_SETREUID)
if(setregid(gid,gid) != 0)
#else /* use setgid */
if(setgid(gid) != 0)
cfg->username, strerror(errno));
#ifdef HAVE_SETRESUID
if(setresuid(uid,uid,uid) != 0)
-#elif defined(HAVE_SETREUID)
+#elif defined(HAVE_SETREUID) && !defined(DARWIN_BROKEN_SETREUID)
if(setreuid(uid,uid) != 0)
#else /* use setuid */
if(setuid(uid) != 0)
+7 November 2008: Wouter
+ - fix bug 217: fixed, setreuid and setregid do not work on MacOSX10.4.
+
6 November 2008: Wouter
- dname_priv must decompress the name before comparison.
- iana portlist updated.