From 1d4f3ca2e931e6d930056aeb683256965503c5e1 Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: Mar 19 2013 23:21:52 +0000 Subject: Fixing a compiler warning introduced by Ticket #561 - disable writing unhashed#user#password to changelog commit c4bd52e2211c043087765f74df6cf6cd41b8f234 Fix description: configuration parameter getter APIs are not advertised to plugins. This patch slapi_config_get_unhashed_ pw_switch which is available among plugins. https://fedorahosted.org/389/ticket/561 Reviewed by Mark (Thank you!!) --- diff --git a/ldap/servers/plugins/replication/cl5_api.c b/ldap/servers/plugins/replication/cl5_api.c index af4e606..74bf6d6 100644 --- a/ldap/servers/plugins/replication/cl5_api.c +++ b/ldap/servers/plugins/replication/cl5_api.c @@ -2517,7 +2517,7 @@ _cl5WriteMod (LDAPMod *mod, char **buff) if (NULL == mod) { return rc; } - if (SLAPD_UNHASHED_PW_NOLOG == config_get_unhashed_pw_switch()) { + if (SLAPD_UNHASHED_PW_NOLOG == slapi_config_get_unhashed_pw_switch()) { if (0 == strcasecmp(mod->mod_type, PSEUDO_ATTR_UNHASHEDUSERPASSWORD)) { /* If nsslapd-unhashed-pw-switch == nolog, skip writing it to cl. */ return rc; diff --git a/ldap/servers/slapd/libglobs.c b/ldap/servers/slapd/libglobs.c index 59790bc..4c977e2 100644 --- a/ldap/servers/slapd/libglobs.c +++ b/ldap/servers/slapd/libglobs.c @@ -6826,12 +6826,18 @@ config_set_unhashed_pw_switch(const char *attrname, char *value, } int +slapi_config_get_unhashed_pw_switch() +{ + return config_get_unhashed_pw_switch(); +} + +int config_get_unhashed_pw_switch() { - int retVal = 0; + int retVal = 0; slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); CFG_LOCK_READ(slapdFrontendConfig); - retVal = slapdFrontendConfig->unhashed_pw_switch; + retVal = slapdFrontendConfig->unhashed_pw_switch; CFG_UNLOCK_READ(slapdFrontendConfig); return retVal; diff --git a/ldap/servers/slapd/slapi-private.h b/ldap/servers/slapd/slapi-private.h index 225c7aa..937c2bb 100644 --- a/ldap/servers/slapd/slapi-private.h +++ b/ldap/servers/slapd/slapi-private.h @@ -811,6 +811,7 @@ int pw_rever_decode(char *cipher, char **plain, const char * attr_name); /* config routines */ int slapi_config_get_readonly(); +int slapi_config_get_unhashed_pw_switch(); /* * charray.c