diff options
author | Sumit Bose <sbose@redhat.com> | 2014-03-06 15:37:57 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-03-10 17:11:04 +0100 |
commit | 17cd7b7233ff6d84786de316eee307a1c1baf7a7 (patch) | |
tree | 26b671ad98e3ad6c903555717eca2550580e98e3 /src | |
parent | bfed0bf8e1f3292ee35c9c98e6c0f487c2a6a1a3 (diff) | |
download | sssd-17cd7b7233ff6d84786de316eee307a1c1baf7a7.tar.gz sssd-17cd7b7233ff6d84786de316eee307a1c1baf7a7.tar.xz sssd-17cd7b7233ff6d84786de316eee307a1c1baf7a7.zip |
IPA: Use GC for AD initgroup requests
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/providers/ipa/ipa_subdomains_id.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/providers/ipa/ipa_subdomains_id.c b/src/providers/ipa/ipa_subdomains_id.c index 0adf80606..bef96e658 100644 --- a/src/providers/ipa/ipa_subdomains_id.c +++ b/src/providers/ipa/ipa_subdomains_id.c @@ -307,13 +307,22 @@ ipa_get_ad_acct_send(TALLOC_CTX *mem_ctx, /* Currently only LDAP port for AD is used because POSIX * attributes are not replicated to GC by default */ - clist = talloc_zero_array(req, struct sdap_id_conn_ctx *, 2); - if (clist == NULL) { - ret = ENOMEM; - goto fail; + + if ((state->ar->entry_type & BE_REQ_TYPE_MASK) == BE_REQ_INITGROUPS) { + clist = ad_gc_conn_list(req, ad_id_ctx, state->user_dom); + if (clist == NULL) { + ret = ENOMEM; + goto fail; + } + } else { + clist = talloc_zero_array(req, struct sdap_id_conn_ctx *, 2); + if (clist == NULL) { + ret = ENOMEM; + goto fail; + } + clist[0] = ad_id_ctx->ldap_ctx; + clist[1] = NULL; } - clist[0] = ad_id_ctx->ldap_ctx; - clist[1] = NULL; /* Now we already need ad_id_ctx in particular sdap_id_conn_ctx */ sdom = sdap_domain_get(sdap_id_ctx->opts, state->user_dom); |