diff --git a/config.h.in b/config.h.in index 7e5a64595..f3b24a448 100644 --- a/config.h.in +++ b/config.h.in @@ -24,9 +24,6 @@ /* Define to 1 if you have the `chroot' function. */ #undef HAVE_CHROOT -/* Define to 1 if you have the `daemon' function. */ -#undef HAVE_DAEMON - /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H diff --git a/configure b/configure index bd0afe6d4..c6cdeaf2e 100755 --- a/configure +++ b/configure @@ -24666,8 +24666,7 @@ fi - -for ac_func in tzset sigprocmask fcntl getpwnam getrlimit setsid sbrk chroot kill sleep usleep random srandom recvmsg sendmsg writev setresuid setreuid setresgid setregid daemon +for ac_func in tzset sigprocmask fcntl getpwnam getrlimit setsid sbrk chroot kill sleep usleep random srandom recvmsg sendmsg writev setresuid setreuid setresgid setregid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 diff --git a/configure.ac b/configure.ac index 6e008ebe7..676c96cf6 100644 --- a/configure.ac +++ b/configure.ac @@ -781,7 +781,7 @@ AC_CHECK_GETADDRINFO_WITH_INCLUDES if test $ac_cv_func_getaddrinfo = no; then 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 daemon]) +AC_CHECK_FUNCS([tzset sigprocmask fcntl getpwnam getrlimit setsid sbrk chroot kill sleep usleep random srandom recvmsg sendmsg writev setresuid setreuid setresgid setregid]) # check mkdir AC_MSG_CHECKING([whether mkdir has one arg]) diff --git a/daemon/unbound.c b/daemon/unbound.c index b286a7212..1fb728678 100644 --- a/daemon/unbound.c +++ b/daemon/unbound.c @@ -287,14 +287,6 @@ checkoldpid(struct config_file* cfg) static void detach(struct config_file* cfg) { -#ifdef HAVE_DAEMON - int err; - if(daemon(1,0)!=0) { - err=errno; - unlink(cfg->pidfile); - fatal_exit("daemon(3) failed: %s", strerror(err)); - } -#else /* !HAVE_DAEMON */ #ifdef HAVE_WORKING_FORK int fd, err; /* Take off... */ @@ -324,7 +316,6 @@ detach(struct config_file* cfg) #else (void)cfg; #endif /* HAVE_WORKING_FORK */ -#endif /* HAVE_DAEMON */ } /** daemonize, drop user priviliges and chroot if needed */ diff --git a/doc/Changelog b/doc/Changelog index ef062a297..0c4c0a726 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,7 @@ +27 August 2008: Wouter + - daemon(3) is causing problems for people. Reverting the patch. + bug#200, and 199 and 203 contain sideline discussion on it. + 26 August 2008: Wouter - test for insecure zone when DLV is in use, also does negative cache. - test for trustanchor when DLV is in use (the anchor works).