Lines Matching refs:cfg

96 verify_value(ns_config_t *cfg, char *name, char *value, char *errstr);
112 timetorefresh(ns_config_t *cfg);
566 timetorefresh(ns_config_t *cfg)
571 if (cfg == NULL || gettimeofday(&tp, NULL) == -1)
574 if (cfg->paramList[NS_LDAP_EXP_P].ns_ptype == TIMET)
575 expire = cfg->paramList[NS_LDAP_EXP_P].ns_tm;
860 * no caller with be waiting on cfg->config_mutex while it is being
865 __s_api_destroy_config(ns_config_t *cfg)
867 if (cfg != NULL) {
868 (void) mutex_lock(&cfg->config_mutex);
869 cfg->delete = TRUE;
870 (void) mutex_unlock(&cfg->config_mutex);
871 __s_api_release_config(cfg);
882 get_curr_config_unlocked(ns_config_t *cfg, boolean_t global)
886 ret = cfg;
887 if (cfg != NULL) {
888 (void) mutex_lock(&cfg->config_mutex);
894 if (cfg->delete && global == B_TRUE)
897 cfg->nUse++;
898 (void) mutex_unlock(&cfg->config_mutex);
912 ns_config_t *cfg;
917 cfg = get_curr_config_unlocked(cur_cfg, B_TRUE);
918 if (cfg != ptr) {
919 __s_api_destroy_config(cfg);
938 ns_config_t *cfg;
949 cfg = get_curr_config_unlocked(cur_cfg, B_FALSE);
950 if (cfg != ptr) {
951 __s_api_destroy_config(cfg);
968 __s_api_release_config(ns_config_t *cfg)
970 if (cfg != NULL) {
971 (void) mutex_lock(&cfg->config_mutex);
972 cfg->nUse--;
973 if (cfg->nUse == 0 && cfg->delete) {
974 destroy_config(cfg);
976 (void) mutex_unlock(&cfg->config_mutex);
1034 ns_config_t *cfg;
1039 cfg = get_curr_config_unlocked(cur_cfg, B_TRUE);
1042 return (cfg);
1052 ns_config_t *cfg;
1063 cfg = get_curr_config_unlocked(cur_cfg, B_FALSE);
1065 return (cfg);
1434 ns_config_t *cfg;
1441 cfg = __s_api_get_default_config_global();
1443 cfg = __s_api_get_default_config();
1446 if (!__s_api_isStandalone() && timetorefresh(cfg)) {
1447 new_cfg = LoadCacheConfiguration(cfg, &errorp);
1448 if (new_cfg != NULL && new_cfg != cfg) {
1449 __s_api_release_config(cfg);
1454 cfg = new_cfg;
1460 return (cfg);
1494 verify_value(ns_config_t *cfg, char *name, char *value, char *errstr)
1508 def = get_defconfig(cfg, index);
2706 ns_config_t *cfg;
2713 cfg = __s_api_get_default_config();
2716 if (cfg == NULL) {
2718 cfg = __s_api_get_default_config();
2719 if (cfg == NULL) {
2735 if (cfg != NULL)
2736 __s_api_release_config(cfg);
2743 cache_server == FALSE && timetorefresh(cfg))
2746 if (cfg == cfg_g) {
2749 new_cfg = LoadCacheConfiguration(cfg, &errorp);
2750 if (new_cfg != cfg)
2751 __s_api_release_config(cfg);
2765 if (new_cfg != cfg) {
2767 cfg = new_cfg;
2774 __s_api_reinit_conn_mgmt_new_config(cfg);
2777 ret = __ns_ldap_setParamValue(cfg, type, data, error);
2779 __s_api_release_config(cfg);
2926 ns_config_t *cfg;
2938 cfg = __s_api_get_default_config();
2942 cache_server == FALSE && timetorefresh(cfg))
2945 if (cfg == cfg_g) {
2948 new_cfg = LoadCacheConfiguration(cfg, &errorp);
2949 if (new_cfg != cfg)
2950 __s_api_release_config(cfg);
2965 if (new_cfg != cfg) {
2967 cfg = new_cfg;
2974 __s_api_reinit_conn_mgmt_new_config(cfg);
2976 if (cfg == NULL) {
2987 __s_api_release_config(cfg);
2990 (*data)[0] = (void *)strdup(cfg->domainName);
2993 __s_api_release_config(cfg);
2996 } else if (cfg->paramList[Param].ns_ptype == NS_UNKNOWN) {
2998 def = get_defconfig(cfg, Param);
3002 *data = dupParam(&(cfg->paramList[Param]));
3004 __s_api_release_config(cfg);
3017 __s_api_strValue(ns_config_t *cfg, ParamIndexType index, ns_strfmt_t fmt)
3032 if (cfg == NULL)
3040 if (cfg->paramList[index].ns_ptype == NS_UNKNOWN)
3045 ptr = &(cfg->paramList[index]);
3050 def = get_defconfig(cfg, index);
3083 if (cfg->version == NS_LDAP_V1) {
3089 if (__print2buf(buffer, __s_get_auth_name(cfg,
3101 if (__print2buf(buffer, __s_get_credlvl_name(cfg,
3178 if (__print2buf(buffer, __s_get_searchref_name(cfg,
3183 if (__print2buf(buffer, __s_get_scope_name(cfg,
3201 for (hptr = cfg->llHead; hptr; hptr = hptr->h_llnext) {
3232 for (hptr = cfg->llHead; hptr; hptr = hptr->h_llnext) {
3509 ns_config_t *cfg;
3536 cfg = SetDoorInfo(buffer, error);
3539 if (cfg == NULL && *error != NULL && (*error)->message != NULL)
3541 return (cfg);
3842 ns_config_t *cfg;
3846 cfg = __s_api_get_default_config();
3847 if (cfg != NULL) {
3848 param = &cfg->paramList[NS_LDAP_HOST_CERTPATH_P];
3851 __s_api_release_config(cfg);