From b29ce207054672844909069625e50c61deceacb7 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 27 Aug 2013 09:15:21 -0400 Subject: pwd-plugin: Fix ignored return error CoverityID: 11904 Also remove 'inline', the compiler can do it on its own if needed. Fixes: https://fedorahosted.org/freeipa/ticket/3882 --- daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'daemons/ipa-slapi-plugins') diff --git a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c index 88cdcb10..1058c313 100644 --- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c +++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c @@ -1220,11 +1220,12 @@ Slapi_Filter *ipapwd_string2filter(char *strfilter) } /* Loads the OTP config entry, parses it, and applies it. */ -static inline bool ipapwd_load_otp_config(void) +static bool ipapwd_load_otp_config(void) { char *config_attrs[] = { IPA_USER_AUTH_TYPE, NULL }; Slapi_Entry *config_entry = NULL; Slapi_DN *config_sdn = NULL; + int ret; /* If we are using an alternate config area, check it for our * configuration, otherwise we just use our main plug-in config @@ -1238,8 +1239,12 @@ static inline bool ipapwd_load_otp_config(void) config_sdn ? slapi_sdn_get_ndn(config_sdn) : "null"); /* Fetch the config entry. */ - slapi_search_internal_get_entry(config_sdn, config_attrs, &config_entry, - ipapwd_plugin_id); + ret = slapi_search_internal_get_entry(config_sdn, config_attrs, + &config_entry, ipapwd_plugin_id); + if (ret != LDAP_SUCCESS) { + LOG_TRACE("Search for OTP config failed, err (%d)\n", ret); + /* fall through, defaults will be set */ + } /* Parse and apply the config. */ ipapwd_parse_otp_config_entry(config_entry, true); -- cgit