Commit 2f135241 authored by Evan Hunt's avatar Evan Hunt Committed by Mark Andrews

initalize a named_g_defaultbindkeys variable

parent 755efa9b
......@@ -90,7 +90,8 @@ EXTERN cfg_obj_t * named_g_config INIT(NULL);
EXTERN const cfg_obj_t * named_g_defaults INIT(NULL);
EXTERN const char * named_g_conffile INIT(NAMED_SYSCONFDIR
"/named.conf");
EXTERN cfg_obj_t * named_g_bindkeys INIT(NULL);
EXTERN cfg_obj_t * named_g_defaultbindkeys INIT(NAMED_SYSCONFDIR
"/bind.keys");
EXTERN const char * named_g_keyfile INIT(NAMED_SYSCONFDIR
"/rndc.key");
......
......@@ -9714,7 +9714,8 @@ named_server_create(isc_mem_t *mctx, named_server_t **serverp) {
CHECKFATAL(server->statsfile == NULL ? ISC_R_NOMEMORY : ISC_R_SUCCESS,
"isc_mem_strdup");
server->bindkeysfile = isc_mem_strdup(server->mctx, "bind.keys");
server->bindkeysfile = isc_mem_strdup(server->mctx,
named_g_defaultbindkeys);
CHECKFATAL(server->bindkeysfile == NULL ? ISC_R_NOMEMORY :
ISC_R_SUCCESS,
"isc_mem_strdup");
......
......@@ -59,6 +59,7 @@ named_paths_init(void) {
named_g_defaultlockfile = isc_ntpaths_get(NAMED_LOCK_PATH);
named_g_keyfile = isc_ntpaths_get(RNDC_KEY_PATH);
named_g_defaultsessionkeyfile = isc_ntpaths_get(SESSION_KEY_PATH);
named_g_defaultbindkeys = isc_ntpaths_get(BIND_KEYS_PATH);
named_g_defaultdnstap = NULL;
Initialized = TRUE;
......
......@@ -33,7 +33,8 @@ enum NtPaths {
LOCAL_STATE_DIR,
SYS_CONF_DIR,
RNDC_KEY_PATH,
SESSION_KEY_PATH
SESSION_KEY_PATH,
BIND_KEYS_PATH
};
/*
......
......@@ -39,6 +39,7 @@ static char sys_conf_dir[MAX_PATH];
static char rndc_keyFile[MAX_PATH];
static char session_keyFile[MAX_PATH];
static char resolv_confFile[MAX_PATH];
static char bind_keysFile[MAX_PATH];
static DWORD baseLen = MAX_PATH;
static BOOL Initialized = FALSE;
......@@ -98,6 +99,9 @@ isc_ntpaths_init(void) {
strlcat(resolv_confFile, "\\etc\\resolv.conf",
sizeof(resolv_confFile));
strlcpy(bind_keysFile, namedBase, sizeof(bind_keysFile));
strlcat(bind_keysFile, "\\etc\\bind.keys", sizeof(bind_keysFile));
Initialized = TRUE;
}
......@@ -134,6 +138,9 @@ isc_ntpaths_get(int ind) {
case SESSION_KEY_PATH:
return (session_keyFile);
break;
case BIND_KEYS_PATH:
return (bind_keysFile);
break;
default:
return (NULL);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment