summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2011-02-22 11:08:32 -0500
committerStephen Gallagher <sgallagh@redhat.com>2011-02-22 15:25:11 -0500
commit19505f9345d7fd03a32b6c23ced2430d74750fc8 (patch)
tree9797b2f20909f837cafe465a525b2ee25a8144e8 /src
parentc08c9f68cf14c950824f22a6f24056ea417b5940 (diff)
downloadsssd-19505f9345d7fd03a32b6c23ced2430d74750fc8.tar.gz
sssd-19505f9345d7fd03a32b6c23ced2430d74750fc8.tar.xz
sssd-19505f9345d7fd03a32b6c23ced2430d74750fc8.zip
Fix uninitialized value error in ipa_get_id_options()
Previously, we were only constructing the basedn variable if the ldap_search_base was not specified (which is unlikely to be in use when using the IPA provier). However, if it did happen, constrcuction of the compat search base for netgroups would be using an uninitialized value. Fixes https://fedorahosted.org/sssd/ticket/806
Diffstat (limited to 'src')
-rw-r--r--src/providers/ipa/ipa_common.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/providers/ipa/ipa_common.c b/src/providers/ipa/ipa_common.c
index 94e436743..397e418b9 100644
--- a/src/providers/ipa/ipa_common.c
+++ b/src/providers/ipa/ipa_common.c
@@ -272,14 +272,14 @@ int ipa_get_id_options(struct ipa_options *ipa_opts,
goto done;
}
- if (NULL == dp_opt_get_string(ipa_opts->id->basic, SDAP_SEARCH_BASE)) {
- ret = domain_to_basedn(tmpctx,
- dp_opt_get_string(ipa_opts->basic, IPA_DOMAIN),
- &basedn);
- if (ret != EOK) {
- goto done;
- }
+ ret = domain_to_basedn(tmpctx,
+ dp_opt_get_string(ipa_opts->basic, IPA_DOMAIN),
+ &basedn);
+ if (ret != EOK) {
+ goto done;
+ }
+ if (NULL == dp_opt_get_string(ipa_opts->id->basic, SDAP_SEARCH_BASE)) {
/* FIXME: get values by querying IPA */
/* set search base */
value = talloc_asprintf(tmpctx, "cn=accounts,%s", basedn);