mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-02-03 20:29:28 -05:00
Fix bug #217
git-svn-id: file:///svn/unbound/trunk@1336 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
c6541a2def
commit
345e5e82d3
5 changed files with 23 additions and 2 deletions
|
|
@ -6,6 +6,10 @@
|
|||
/* 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
|
||||
|
||||
|
|
|
|||
9
configure
vendored
9
configure
vendored
|
|
@ -25003,6 +25003,15 @@ fi
|
|||
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; }
|
||||
|
|
|
|||
|
|
@ -797,6 +797,11 @@ AC_LIBOBJ([fake-rfc2553])
|
|||
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([
|
||||
|
|
|
|||
|
|
@ -443,7 +443,7 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
|
|||
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)
|
||||
|
|
@ -452,7 +452,7 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
|
|||
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)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue