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:21:47 -0500
commitbe0a90dcb8ef938b4be07d85466284f8cb6126ca (patch)
tree6e957fddb4ef72d0345ffec99feaf7b5e85cc215 /src
parent9bd24b75f3252817addc052673959bde7cad5ebc (diff)
downloadsssd-be0a90dcb8ef938b4be07d85466284f8cb6126ca.tar.gz
sssd-be0a90dcb8ef938b4be07d85466284f8cb6126ca.tar.xz
sssd-be0a90dcb8ef938b4be07d85466284f8cb6126ca.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);