From c2d0215c73833e9b148e7ff544508f5c485150d5 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 14 Feb 2011 14:59:18 -0500 Subject: Point the IPA provider at the compat tree for netgroups We don't yet have support for IPA's internal representation of netgroups, so we need to use its compatibility mode for the time being. --- src/providers/ipa/ipa_common.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/providers/ipa') diff --git a/src/providers/ipa/ipa_common.c b/src/providers/ipa/ipa_common.c index 401c19305..c146735c7 100644 --- a/src/providers/ipa/ipa_common.c +++ b/src/providers/ipa/ipa_common.c @@ -372,12 +372,31 @@ int ipa_get_id_options(struct ipa_options *ipa_opts, if (NULL == dp_opt_get_string(ipa_opts->id->basic, SDAP_NETGROUP_SEARCH_BASE)) { +#if 0 ret = dp_opt_set_string(ipa_opts->id->basic, SDAP_NETGROUP_SEARCH_BASE, dp_opt_get_string(ipa_opts->id->basic, SDAP_SEARCH_BASE)); if (ret != EOK) { goto done; } +#else + /* We don't yet have support for the native representation + * of netgroups in IPA. For now, we need to point at the + * compat tree + */ + value = talloc_asprintf(tmpctx, "cn=ng,cn=compat,%s", basedn); + if (!value) { + ret = ENOMEM; + goto done; + } + + ret = dp_opt_set_string(ipa_opts->id->basic, + SDAP_NETGROUP_SEARCH_BASE, + value); + if (ret != EOK) { + goto done; + } +#endif DEBUG(6, ("Option %s set to %s\n", ipa_opts->id->basic[SDAP_NETGROUP_SEARCH_BASE].opt_name, dp_opt_get_string(ipa_opts->id->basic, -- cgit