Lines Matching defs:cfg

95 verify_value(ns_config_t *cfg, char *name, char *value, char *errstr);
111 timetorefresh(ns_config_t *cfg);
565 timetorefresh(ns_config_t *cfg)
570 if (cfg == NULL || gettimeofday(&tp, NULL) == -1)
573 if (cfg->paramList[NS_LDAP_EXP_P].ns_ptype == TIMET)
574 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);
1458 ns_config_t *cfg;
1465 cfg = __s_api_get_default_config_global();
1467 cfg = __s_api_get_default_config();
1470 if (!__s_api_isStandalone() && timetorefresh(cfg)) {
1471 new_cfg = LoadCacheConfiguration(cfg, &errorp);
1472 if (new_cfg != NULL && new_cfg != cfg) {
1473 __s_api_release_config(cfg);
1478 cfg = new_cfg;
1484 return (cfg);
1518 verify_value(ns_config_t *cfg, char *name, char *value, char *errstr)
1532 def = get_defconfig(cfg, index);
2730 ns_config_t *cfg;
2737 cfg = __s_api_get_default_config();
2740 if (cfg == NULL) {
2742 cfg = __s_api_get_default_config();
2743 if (cfg == NULL) {
2759 if (cfg != NULL)
2760 __s_api_release_config(cfg);
2767 cache_server == FALSE && timetorefresh(cfg))
2770 if (cfg == cfg_g) {
2773 new_cfg = LoadCacheConfiguration(cfg, &errorp);
2774 if (new_cfg != cfg)
2775 __s_api_release_config(cfg);
2789 if (new_cfg != cfg) {
2791 cfg = new_cfg;
2798 __s_api_reinit_conn_mgmt_new_config(cfg);
2801 ret = __ns_ldap_setParamValue(cfg, type, data, error);
2803 __s_api_release_config(cfg);
2950 ns_config_t *cfg;
2962 cfg = __s_api_get_default_config();
2966 cache_server == FALSE && timetorefresh(cfg))
2969 if (cfg == cfg_g) {
2972 new_cfg = LoadCacheConfiguration(cfg, &errorp);
2973 if (new_cfg != cfg)
2974 __s_api_release_config(cfg);
2989 if (new_cfg != cfg) {
2991 cfg = new_cfg;
2998 __s_api_reinit_conn_mgmt_new_config(cfg);
3000 if (cfg == NULL) {
3011 __s_api_release_config(cfg);
3014 (*data)[0] = (void *)strdup(cfg->domainName);
3017 __s_api_release_config(cfg);
3020 } else if (cfg->paramList[Param].ns_ptype == NS_UNKNOWN) {
3022 def = get_defconfig(cfg, Param);
3026 *data = dupParam(&(cfg->paramList[Param]));
3028 __s_api_release_config(cfg);
3041 __s_api_strValue(ns_config_t *cfg, ParamIndexType index, ns_strfmt_t fmt)
3056 if (cfg == NULL)
3064 if (cfg->paramList[index].ns_ptype == NS_UNKNOWN)
3069 ptr = &(cfg->paramList[index]);
3074 def = get_defconfig(cfg, index);
3107 if (cfg->version == NS_LDAP_V1) {
3113 if (__print2buf(buffer, __s_get_auth_name(cfg,
3125 if (__print2buf(buffer, __s_get_credlvl_name(cfg,
3202 if (__print2buf(buffer, __s_get_searchref_name(cfg,
3207 if (__print2buf(buffer, __s_get_scope_name(cfg,
3225 for (hptr = cfg->llHead; hptr; hptr = hptr->h_llnext) {
3256 for (hptr = cfg->llHead; hptr; hptr = hptr->h_llnext) {
3533 ns_config_t *cfg;
3560 cfg = SetDoorInfo(buffer, error);
3563 if (cfg == NULL && *error != NULL && (*error)->message != NULL)
3565 return (cfg);
3866 ns_config_t *cfg;
3870 cfg = __s_api_get_default_config();
3871 if (cfg != NULL) {
3872 param = &cfg->paramList[NS_LDAP_HOST_CERTPATH_P];
3875 __s_api_release_config(cfg);