diff options
author | Simo Sorce <simo@redhat.com> | 2013-08-27 09:15:21 -0400 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2013-08-28 12:42:56 +0200 |
commit | b29ce207054672844909069625e50c61deceacb7 (patch) | |
tree | 01699d589d7dba4365e9b43de36c01b2df52a5f4 /daemons/ipa-slapi-plugins/ipa-pwd-extop | |
parent | 3c9261699a79bffcb6362aeb03dec36ed588f81e (diff) | |
download | freeipa-b29ce207054672844909069625e50c61deceacb7.tar.gz freeipa-b29ce207054672844909069625e50c61deceacb7.tar.xz freeipa-b29ce207054672844909069625e50c61deceacb7.zip |
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
Diffstat (limited to 'daemons/ipa-slapi-plugins/ipa-pwd-extop')
-rw-r--r-- | daemons/ipa-slapi-plugins/ipa-pwd-extop/ipa_pwd_extop.c | 11 |
1 files changed, 8 insertions, 3 deletions
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 88cdcb10f..1058c313d 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); |