예제 #1
0
파일: os.c 프로젝트: mnagy/bind-dynamic_db
void
ns_paths_init() {
	if (!Initialized)
		isc_ntpaths_init();

	ns_g_conffile = isc_ntpaths_get(NAMED_CONF_PATH);
	lwresd_g_conffile = isc_ntpaths_get(LWRES_CONF_PATH);
	lwresd_g_resolvconffile = isc_ntpaths_get(RESOLV_CONF_PATH);
	ns_g_conffile = isc_ntpaths_get(NAMED_CONF_PATH);
	ns_g_defaultpidfile = isc_ntpaths_get(NAMED_PID_PATH);
	lwresd_g_defaultpidfile = isc_ntpaths_get(LWRESD_PID_PATH);
	ns_g_keyfile = isc_ntpaths_get(RNDC_KEY_PATH);

	Initialized = TRUE;
}
예제 #2
0
파일: ntpaths.c 프로젝트: 274914765/C
char *isc_ntpaths_get (int ind)
{
    if (!Initialized)
        isc_ntpaths_init ();

    switch (ind)
    {
        case NAMED_CONF_PATH:
            return (ns_confFile);
            break;
        case LWRES_CONF_PATH:
            return (lwresd_confFile);
            break;
        case RESOLV_CONF_PATH:
            return (lwresd_resolvconfFile);
            break;
        case RNDC_CONF_PATH:
            return (rndc_confFile);
            break;
        case NAMED_PID_PATH:
            return (ns_defaultpidfile);
            break;
        case LWRESD_PID_PATH:
            return (lwresd_defaultpidfile);
            break;
        case LOCAL_STATE_DIR:
            return (local_state_dir);
            break;
        case SYS_CONF_DIR:
            return (sys_conf_dir);
            break;
        case RNDC_KEY_PATH:
            return (rndc_keyFile);
            break;
        case SESSION_KEY_PATH:
            return (session_keyFile);
            break;
        default:
            return (NULL);
    }
}