]> git.ipfire.org Git - thirdparty/bind9.git/commit
Delay release of root privileges until after configuring controls
authorEvan Hunt <each@isc.org>
Wed, 3 Jul 2024 06:40:54 +0000 (23:40 -0700)
committerEvan Hunt <each@isc.org>
Thu, 29 Aug 2024 17:34:38 +0000 (10:34 -0700)
commitd57fa148afff957d77fffdca74bfe4541ff16c10
tree2fcf3bd992dbebf45e9b8bdb372fd65b814cec27
parent9afcdc2b184e96b0ce5a62373cccaa9a804fb2f0
Delay release of root privileges until after configuring controls

On systems where root access is needed to configure privileged
ports, we don't want to fully relinquish root privileges until
after the control channel (which typically runs on port 953) has
been established.

named_os_changeuser() now takes a boolean argument 'permanent'.
This allows us to switch the effective userid temporarily with
named_os_changeuser(false) and restore it with named_os_restoreuser(),
before permanently dropping privileges with named_os_changeuser(true).
bin/named/include/named/os.h
bin/named/os.c
bin/named/server.c