]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
check for <sys/prctl.h>, not <linux/prctl.h> [RT #679]
authorBrian Wellington <source@isc.org>
Sat, 24 Feb 2001 23:05:09 +0000 (23:05 +0000)
committerBrian Wellington <source@isc.org>
Sat, 24 Feb 2001 23:05:09 +0000 (23:05 +0000)
bin/named/unix/os.c
config.h.in
configure.in

index 3afdc268771c44ab6d47f7b22270c28eec358719..49da83ec41bbe59007f5da18f8c908034dfce442 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: os.c,v 1.38 2001/01/09 21:40:38 bwelling Exp $ */
+/* $Id: os.c,v 1.39 2001/02/24 23:05:09 bwelling Exp $ */
 
 #include <config.h>
 #include <stdarg.h>
@@ -45,14 +45,14 @@ static char *pidfile = NULL;
  * If there's no <linux/capability.h>, we don't care about <linux/prctl.h>
  */
 #ifndef HAVE_LINUX_CAPABILITY_H
-#undef HAVE_LINUX_PRCTL_H
+#undef HAVE_SYS_PRCTL_H
 #endif
 
 /*
  * Linux defines:
  *     (T) HAVE_LINUXTHREADS
  *     (C) HAVE_LINUX_CAPABILITY_H
- *     (P) HAVE_LINUX_PRCTL_H
+ *     (P) HAVE_SYS_PRCTL_H
  * The possible cases are:
  *     none:   setuid() normally
  *     T:      no setuid()
@@ -108,7 +108,7 @@ static isc_boolean_t non_root_caps = ISC_FALSE;
 #include <sys/syscall.h>       /* Required for syscall(). */
 #include <linux/capability.h>  /* Required for _LINUX_CAPABILITY_VERSION. */
 
-#ifdef HAVE_LINUX_PRCTL_H
+#ifdef HAVE_SYS_PRCTL_H
 #include <sys/prctl.h>         /* Required for prctl(). */
 
 /*
@@ -121,7 +121,7 @@ static isc_boolean_t non_root_caps = ISC_FALSE;
 #define PR_SET_KEEPCAPS 8
 #endif
 
-#endif /* HAVE_LINUX_PRCTL_H */
+#endif /* HAVE_SYS_PRCTL_H */
 
 #ifndef SYS_capset
 #define SYS_capset __NR_capset
@@ -168,7 +168,7 @@ linux_initialprivs(void) {
         */
        caps |= (1 << CAP_SYS_CHROOT);
 
-#if defined(HAVE_LINUX_PRCTL_H) || !defined(HAVE_LINUXTHREADS)
+#if defined(HAVE_SYS_PRCTL_H) || !defined(HAVE_LINUXTHREADS)
        /*
         * We can setuid() only if either the kernel supports keeping
         * capabilities after setuid() (which we don't know until we've
@@ -228,7 +228,7 @@ linux_minprivs(void) {
        linux_setcaps(caps);
 }
 
-#ifdef HAVE_LINUX_PRCTL_H
+#ifdef HAVE_SYS_PRCTL_H
 static void
 linux_keepcaps(void) {
        /*
@@ -393,7 +393,7 @@ ns_os_changeuser(void) {
 
 void
 ns_os_minprivs(void) {
-#ifdef HAVE_LINUX_PRCTL_H
+#ifdef HAVE_SYS_PRCTL_H
        linux_keepcaps();
 #endif
 
index 54d330a18389eed3376d38f587704024c497c352..c4aa47da13745ff5e93aea0a76635a7af36bcaa0 100644 (file)
@@ -16,7 +16,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: config.h.in,v 1.41 2001/01/18 22:21:24 bwelling Exp $ */
+/* $Id: config.h.in,v 1.42 2001/02/24 23:05:07 bwelling Exp $ */
 
 /***
  *** This file is not to be included by any public header files, because
@@ -138,8 +138,11 @@ int sigwait(const unsigned int *set, int *sig);
 /* Define if you have the <linux/capability.h> header file.  */
 #undef HAVE_LINUX_CAPABILITY_H
 
-/* Define if you have the <linux/prctl.h> header file.  */
-#undef HAVE_LINUX_PRCTL_H
+/* Define if you have the <sys/prctl.h> header file.  */
+#undef HAVE_SYS_PRCTL_H
+
+/* Define if you have the <sys/select.h> header file.  */
+#undef HAVE_SYS_SELECT_H
 
 /* Define if you have the <sys/sockio.h> header file.  */
 #undef HAVE_SYS_SOCKIO_H
index c2bd710269fa797b71b8579e2dc3c0edf3e9a5ea..70d8795fa0b90a821112a82287cddd5f4f7cd953 100644 (file)
@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
 esyscmd([sed "s/^/# /" COPYRIGHT])dnl
 AC_DIVERT_POP()dnl
 
-AC_REVISION($Revision: 1.232 $)
+AC_REVISION($Revision: 1.233 $)
 
 AC_INIT(lib/dns/name.c)
 AC_PREREQ(2.13)
@@ -1210,7 +1210,7 @@ AC_SUBST(ISC_PLATFORM_LONGLONGEQUALLONG)
 #
 AC_CHECK_FUNC(chroot, AC_DEFINE(HAVE_CHROOT))
 AC_CHECK_HEADERS(linux/capability.h)
-AC_CHECK_HEADERS(linux/prctl.h)
+AC_CHECK_HEADERS(sys/prctl.h)
 
 #
 # BSD/OS, and perhaps some others, don't define rlim_t.