diff options
author | Internet Software Consortium, Inc <@isc.org> | 2013-08-14 06:36:37 -0600 |
---|---|---|
committer | Internet Software Consortium, Inc <@isc.org> | 2013-08-14 06:36:37 -0600 |
commit | 816cb5580f04b5989e0f952510d64201a16d0494 (patch) | |
tree | a08dd0d3a33801ef7e5d35a5b435121a577fdd01 /bin/named | |
parent | ebbc86ee1eae2231a10e23f4cda592085dbc7eef (diff) | |
download | bind9-816cb5580f04b5989e0f952510d64201a16d0494.tar.gz |
9.9.4rc1
Diffstat (limited to 'bin/named')
-rw-r--r-- | bin/named/server.c | 14 | ||||
-rw-r--r-- | bin/named/unix/os.c | 5 |
2 files changed, 13 insertions, 6 deletions
diff --git a/bin/named/server.c b/bin/named/server.c index f2850475..15df8499 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -5644,7 +5644,7 @@ view_loaded(void *arg) { } static isc_result_t -load_zones(ns_server_t *server) { +load_zones(ns_server_t *server, isc_boolean_t init) { isc_result_t result; dns_view_t *view; ns_zoneload_t *zl; @@ -5695,12 +5695,14 @@ load_zones(ns_server_t *server) { if (refs == 0) { isc_refcount_destroy(&zl->refs); isc_mem_put(server->mctx, zl, sizeof (*zl)); - } else { + } else if (init) { /* * Place the task manager into privileged mode. This * ensures that after we leave task-exclusive mode, no * other tasks will be able to run except for the ones - * that are loading zones. + * that are loading zones. (This should only be done during + * the initial server setup; it isn't necessary during + * a reload.) */ isc_taskmgr_setmode(ns_g_taskmgr, isc_taskmgrmode_privileged); } @@ -5792,7 +5794,7 @@ run_server(isc_task_t *task, isc_event_t *event) { isc_hash_init(); - CHECKFATAL(load_zones(server), "loading zones"); + CHECKFATAL(load_zones(server, ISC_TRUE), "loading zones"); } void @@ -6229,7 +6231,7 @@ reload(ns_server_t *server) { isc_result_t result; CHECK(loadconfig(server)); - result = load_zones(server); + result = load_zones(server, ISC_FALSE); if (result == ISC_R_SUCCESS) isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_SERVER, ISC_LOG_INFO, @@ -8442,6 +8444,8 @@ ns_server_signing(ns_server_t *server, char *args, isc_buffer_t *text) { isc_buffer_add(text, n); } + if (!first && isc_buffer_availablelength(text) > 0) + isc_buffer_putuint8(text, 0); if (result == ISC_R_NOMORE) result = ISC_R_SUCCESS; diff --git a/bin/named/unix/os.c b/bin/named/unix/os.c index 4f5f55c3..1a0d4db7 100644 --- a/bin/named/unix/os.c +++ b/bin/named/unix/os.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2011 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2011, 2013 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2002 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -117,6 +117,9 @@ static int dfd[2] = { -1, -1 }; static isc_boolean_t non_root = ISC_FALSE; static isc_boolean_t non_root_caps = ISC_FALSE; +#ifdef HAVE_LINUX_TYPES_H +#include <linux/types.h> +#endif #ifdef HAVE_SYS_CAPABILITY_H #include <sys/capability.h> #else |