diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2012-04-26 11:21:59 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-05-03 11:46:17 -0400 |
commit | 07002c911aa643000856f78707f1fee72b5eea29 (patch) | |
tree | f0bb49ca4886918d8ff369a8030c456f835e9fe1 | |
parent | c9041cb7addc1a49e0771246d17de101662fbcbc (diff) | |
download | sssd-07002c911aa643000856f78707f1fee72b5eea29.tar.gz sssd-07002c911aa643000856f78707f1fee72b5eea29.tar.bz2 sssd-07002c911aa643000856f78707f1fee72b5eea29.zip |
IPA: Check return values
-rw-r--r-- | src/providers/ipa/ipa_common.c | 8 | ||||
-rw-r--r-- | src/providers/ipa/ipa_hosts.c | 6 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/providers/ipa/ipa_common.c b/src/providers/ipa/ipa_common.c index 225c9786..262a9bcc 100644 --- a/src/providers/ipa/ipa_common.c +++ b/src/providers/ipa/ipa_common.c @@ -916,6 +916,10 @@ int ipa_get_autofs_options(struct ipa_options *ipa_opts, ret = sdap_parse_search_base(ipa_opts->id, ipa_opts->id->basic, SDAP_AUTOFS_SEARCH_BASE, &ipa_opts->id->autofs_search_bases); + if (ret != EOK && ret != ENOENT) { + DEBUG(SSSDBG_OP_FAILURE, ("Could not parse autofs search base\n")); + goto done; + } ret = sdap_get_map(ipa_opts->id, cdb, conf_path, ipa_autofs_mobject_map, @@ -924,7 +928,7 @@ int ipa_get_autofs_options(struct ipa_options *ipa_opts, if (ret != EOK) { DEBUG(SSSDBG_OP_FAILURE, ("Could not get autofs map object attribute map\n")); - return ret; + goto done; } ret = sdap_get_map(ipa_opts->id, cdb, conf_path, @@ -934,7 +938,7 @@ int ipa_get_autofs_options(struct ipa_options *ipa_opts, if (ret != EOK) { DEBUG(SSSDBG_OP_FAILURE, ("Could not get autofs entry object attribute map\n")); - return ret; + goto done; } *_opts = ipa_opts->id; diff --git a/src/providers/ipa/ipa_hosts.c b/src/providers/ipa/ipa_hosts.c index 5252ac9b..30013864 100644 --- a/src/providers/ipa/ipa_hosts.c +++ b/src/providers/ipa/ipa_hosts.c @@ -332,6 +332,12 @@ ipa_hostgroup_info_done(struct tevent_req *subreq) &hostgroup_count, &hostgroups); talloc_zfree(subreq); + if (ret != EOK) { + DEBUG(SSSDBG_OP_FAILURE, + ("sdap_get_generic_recv failed: [%d]\n", ret)); + tevent_req_error(req, ret); + return; + } /* Merge the two arrays */ if (hostgroup_count > 0) { |