2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-28 13:08:06 +00:00

150 Commits

Author SHA1 Message Date
Andreas Gustafsson
2f734e0a7e sizeof style 2001-09-19 23:08:24 +00:00
Mark Andrews
fe6b7ccc8d ns_os_*memstats() -> ns_main_setmemstats() 2001-09-07 00:37:02 +00:00
Mark Andrews
a24d253a3f 982. [func] If "memstatistics-file" is set in options the memory
statistics will be written to it.
2001-09-06 02:13:55 +00:00
Mark Andrews
4b87939256 strerror() -> isc__strerror() [RT #1689] 2001-08-31 05:57:58 +00:00
Andreas Gustafsson
f462b9aed2 Revert change 966. Brian says user-level programs should not include
any headers under asm.
2001-08-29 18:03:36 +00:00
Mark Andrews
b885fd1d53 966. [port] #include <asm/unistd.h> is required on some Linux
ports.  [RT #1670]
2001-08-29 04:21:51 +00:00
Mark Andrews
1666a83cab add sys/types.h for FreeBSD 2.1. 2001-05-25 07:42:15 +00:00
Brian Wellington
76477bd0e0 821. [bug] The program name used when logging to syslog should
be stripped of leading path components.
			[RT #1178, #1232]
2001-05-03 19:06:25 +00:00
Brian Wellington
c9e698df1b When attempting to open a non-regular file as a pid file, assign errno rather
than printing an uninitialized value.
2001-04-04 21:45:29 +00:00
Brian Wellington
55839cbe31 Linux 2.2.18 supports the prctl() call necessary for running setuid. 2001-03-19 22:41:22 +00:00
Brian Wellington
1d8cbe855f missed a few prctl.h changes 2001-02-24 23:06:34 +00:00
Brian Wellington
f8727bd903 check for <sys/prctl.h>, not <linux/prctl.h> [RT #679] 2001-02-24 23:05:09 +00:00
Brian Wellington
499b34cea0 copyright update 2001-01-09 22:01:04 +00:00
Brian Wellington
d119051ef7 667. [bug] On Linux, running named with the -u option and a
non-world-readable configuration file didn't work.
                        [RT #626]
2001-01-09 00:10:42 +00:00
Mark Andrews
8fd925169f keep CAP_SYS_RESOURCE 2000-12-14 18:29:57 +00:00
David Lawrence
108490a7f8 keep the CAP_SYS_RESOURCE capability on linux systems.
as someone noted before (bob?  brian?) this might not really be the right
thing to do in a linuxthreads program.
2000-11-14 23:57:45 +00:00
Michael Sawyer
3b269c0cf3 Move file write routines to server.c, using isc_stdio_*.
Implement default filename for stats file.
Properly free the name's memory when shutting down.
2000-11-08 18:58:02 +00:00
Michael Sawyer
a3a11c4f3f Add the ability (via rndc dump-statistics) to dump a file with counters of
various results given to queries.  Enable the (previously disabled)
statistics-file config option.
2000-11-07 23:49:42 +00:00
Brian Wellington
51e0ad287f Hopefully make the linux-specific stuff work when threads are not used. 2000-08-29 17:54:23 +00:00
Brian Wellington
d1e4b08844 Comment the PR_SET_KEEPCAPS definition. 2000-08-10 18:56:58 +00:00
Brian Wellington
da76a8046e 382. [bug] named -u failed on Debian Linux. 2000-08-10 00:31:59 +00:00
David Lawrence
40f53fa8d9 Trailing whitespace trimmed. Perhaps running "perl util/spacewhack.pl in your
own CVS tree will help minimize CVS conflicts.  Maybe not.
Blame Graff for getting me to trim all trailing whitespace.
2000-08-01 01:33:37 +00:00
David Lawrence
15a4474541 word wrap copyright notice at column 70 2000-07-27 09:55:03 +00:00
Brian Wellington
663841abe0 338. [bug] lwresd logged to syslog as named, not lwresd. 2000-07-18 17:50:02 +00:00
Brian Wellington
71954c9571 I lied. This should be the last change to the setuid() code. Call
initgroups() from ns_os_inituserinfo, and make sure that Linux initially has
the CAP_SETGID capability set so that it doesn't fail.
2000-07-08 00:12:21 +00:00
Brian Wellington
c336121fb5 Hopefully the last change to the setuid code. Only call initgroups()
if getuid() == 0.  Don't call ns_os_changeuser() more than once (it
could happen on Linux).

The code in its current form doesn't check for root before calling
setgid() or setuid(), since they'll fail and print reasonable error
messages (unless -u is supplied with the non-root user that ran named,
in which case it would succeed).  The call to initgroups() would fail for
non root, so it shouldn't be tried.

The previous (as of a few days ago) code just ignored the -u parameter
when named was run as non-root.  This was not good.
2000-07-07 23:53:35 +00:00
Brian Wellington
4e5388b459 Clean up the uid switching code again so that setgid() is called in
ns_os_changeuser().
2000-07-07 22:10:54 +00:00
Andreas Gustafsson
c6ab6ca3fd moved linux_keepcaps() call and check for Linux nonroot caps back
to earlier locations; use a separate boolean flag for keeping track of whether a
UID switch was requested rather than overloading the UID value zero
2000-07-05 22:03:42 +00:00
Brian Wellington
1e105376dd linux_keepcaps() was called without checking the various defines that
surrounded the function definition.
2000-07-03 20:00:44 +00:00
Brian Wellington
79e873be59 The reordering of code in the last change broke linux, since the determination
of whether we could call setuid() was moved after the check.
2000-07-03 18:28:38 +00:00
David Lawrence
202991557a 299. [cleanup] Get the user and group information before changing the
root directory, so the administrator does not need to
			keep a copy of the user and group databases in the
			chroot'ed environment.  Suggested by Hakan Olsson.
2000-07-01 00:48:06 +00:00
Michael Graff
15197aefa1 workaround for NetBSD - close FDs before dup2(). 2000-06-28 16:26:40 +00:00
David Lawrence
9c3531d72a add RCS id string 2000-06-22 22:00:42 +00:00
Brian Wellington
7777118507 (#260) Running named as a non-root user failed on Linux kernels new enough to
support retaining capabilities after setuid().
2000-06-16 07:35:54 +00:00
David Lawrence
de8661e517 grp.h is required for initgroups() prototype on IRIX. 2000-05-14 13:52:53 +00:00
David Lawrence
1a69a1a78c Megacommit of dozens of files.
Cleanup of redundant/useless header file inclusion.

ISC style lint, primarily for function declarations and standalone
comments -- ie, those that appear on a line without any code, which
should be written as follows:
   /*
    * This is a comment.
    */
2000-05-08 14:38:29 +00:00
Andreas Gustafsson
e5afb85e52 added a missing '#ifdef HAVE_LINUXTHREADS' 2000-04-11 20:29:37 +00:00
Bob Halley
134ba0e08a Linux PR_SET_KEEPCAPS support 2000-04-11 18:51:19 +00:00
Bob Halley
077daa2122 Prevent capability.h from #including <linux/fs.h>. When a 2.3 <linux/fs.h> is
included, we get conflicts between <string.h> and <linux/string.h> that
make the compilation fail.  This change also eliminates compiler warnings when
os.c is compiled on a system with a 2.2 <linux/capability.h>.
2000-03-28 19:46:53 +00:00
Michael Graff
ed0b018ee0 minor reformatting issue; no functional change made. 2000-03-28 00:10:02 +00:00
Bob Halley
7d98a1783f update copyrights 2000-02-03 22:29:57 +00:00
Mark Andrews
e63f7c6f55 lint 2000-02-02 00:58:15 +00:00
Bob Halley
5e4b7294d8 remove CAP_SYS_RESOURCE 2000-02-01 20:17:32 +00:00
Bob Halley
9ee5efde7d pid file support 2000-01-29 01:38:09 +00:00
Bob Halley
2dfd6bca9a add chroot and changeuser; revise linux privs 2000-01-28 20:09:14 +00:00
Bob Halley
2aa67e804d add ns_os_deamonize() 2000-01-26 21:12:33 +00:00
Bob Halley
4344875f60 Fix linux privilege dropping. 1999-10-31 02:05:31 +00:00
Bob Halley
dce6dc45b1 linux_dropprivs() seems to be broken; disable for now 1999-10-30 03:38:52 +00:00
Bob Halley
1fc4929aa6 syslog support 1999-10-25 18:59:38 +00:00
Bob Halley
9b2267b5ba add 1999-10-23 01:08:57 +00:00