Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
BIND
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
582
Issues
582
List
Boards
Labels
Service Desk
Milestones
Merge Requests
110
Merge Requests
110
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
BIND
Commits
f8727bd9
Commit
f8727bd9
authored
Feb 24, 2001
by
Brian Wellington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check for <sys/prctl.h>, not <linux/prctl.h> [RT #679]
parent
14c615e9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
13 deletions
+16
-13
bin/named/unix/os.c
bin/named/unix/os.c
+8
-8
config.h.in
config.h.in
+6
-3
configure.in
configure.in
+2
-2
No files found.
bin/named/unix/os.c
View file @
f8727bd9
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: os.c,v 1.3
8 2001/01/09 21:40:38
bwelling Exp $ */
/* $Id: os.c,v 1.3
9 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
...
...
config.h.in
View file @
f8727bd9
...
...
@@ -16,7 +16,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: config.h.in,v 1.4
1 2001/01/18 22:21:24
bwelling Exp $ */
/* $Id: config.h.in,v 1.4
2 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
...
...
configure.in
View file @
f8727bd9
...
...
@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
AC_DIVERT_POP()dnl
AC_REVISION($Revision: 1.23
2
$)
AC_REVISION($Revision: 1.23
3
$)
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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment