mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 15:45:25 +00:00
3039. [bug] Save and restore the gid when creating creating
named.pid at startup. [RT #23290]
This commit is contained in:
5
CHANGES
5
CHANGES
@@ -1,4 +1,7 @@
|
|||||||
3048. [bug] Fully seperate view key mangement. [RT #23419]
|
3039. [bug] Save and restore the gid when creating creating
|
||||||
|
named.pid at startup. [RT #23290]
|
||||||
|
|
||||||
|
3048. [bug] Fully separate view key mangement. [RT #23419]
|
||||||
|
|
||||||
3047. [bug] DNSKEY NODATA responses not cached fixed in
|
3047. [bug] DNSKEY NODATA responses not cached fixed in
|
||||||
validator.c. Tests added to dnssec system test.
|
validator.c. Tests added to dnssec system test.
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: os.c,v 1.106 2011/02/21 23:47:45 tbox Exp $ */
|
/* $Id: os.c,v 1.107 2011/03/02 00:02:54 marka Exp $ */
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
@@ -790,6 +790,9 @@ ns_os_openfile(const char *filename, mode_t mode, isc_boolean_t switch_user) {
|
|||||||
free(f);
|
free(f);
|
||||||
|
|
||||||
if (switch_user && runas_pw != NULL) {
|
if (switch_user && runas_pw != NULL) {
|
||||||
|
#ifndef HAVE_LINUXTHREADS
|
||||||
|
gid_t oldgid = getgid();
|
||||||
|
#endif
|
||||||
/* Set UID/GID to the one we'll be running with eventually */
|
/* Set UID/GID to the one we'll be running with eventually */
|
||||||
setperms(runas_pw->pw_uid, runas_pw->pw_gid);
|
setperms(runas_pw->pw_uid, runas_pw->pw_gid);
|
||||||
|
|
||||||
@@ -797,7 +800,7 @@ ns_os_openfile(const char *filename, mode_t mode, isc_boolean_t switch_user) {
|
|||||||
|
|
||||||
#ifndef HAVE_LINUXTHREADS
|
#ifndef HAVE_LINUXTHREADS
|
||||||
/* Restore UID/GID to root */
|
/* Restore UID/GID to root */
|
||||||
setperms(0, 0);
|
setperms(0, oldgid);
|
||||||
#endif /* HAVE_LINUXTHREADS */
|
#endif /* HAVE_LINUXTHREADS */
|
||||||
|
|
||||||
if (fd == -1) {
|
if (fd == -1) {
|
||||||
|
Reference in New Issue
Block a user