diff options
author | Michal Zidek <mzidek@redhat.com> | 2014-09-10 12:56:54 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-09-15 11:17:27 +0200 |
commit | 8d47f715ca63388f2dcbcdf3f2ccdb44e7d47b93 (patch) | |
tree | f136f0ad323c96e0c0a970815c78802e5531ecbc /src/providers/ldap/sdap_async_enum.c | |
parent | 10f2902a1a630cdc952263b5dc5f41fb557e2791 (diff) | |
download | sssd-8d47f715ca63388f2dcbcdf3f2ccdb44e7d47b93.tar.gz sssd-8d47f715ca63388f2dcbcdf3f2ccdb44e7d47b93.tar.xz sssd-8d47f715ca63388f2dcbcdf3f2ccdb44e7d47b93.zip |
Use the alternative objectclass in group maps.
Use the alternative group objectclass in queries.
Fixes:
https://fedorahosted.org/sssd/ticket/2436
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
(cherry picked from commit 7ba70236daccb48432350147d0560b3302518cee)
(cherry picked from commit 9e99c000a4e2647328e71b4db272b4b73a7189c5)
Diffstat (limited to 'src/providers/ldap/sdap_async_enum.c')
-rw-r--r-- | src/providers/ldap/sdap_async_enum.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/providers/ldap/sdap_async_enum.c b/src/providers/ldap/sdap_async_enum.c index 16ba953bb..83bdde3f7 100644 --- a/src/providers/ldap/sdap_async_enum.c +++ b/src/providers/ldap/sdap_async_enum.c @@ -717,6 +717,7 @@ static struct tevent_req *enum_groups_send(TALLOC_CTX *memctx, struct enum_groups_state *state; int ret; bool use_mapping; + char *oc_list; req = tevent_req_create(memctx, &state, struct enum_groups_state); if (!req) return NULL; @@ -732,9 +733,14 @@ static struct tevent_req *enum_groups_send(TALLOC_CTX *memctx, sdom->dom->domain_id); /* We always want to filter on objectclass and an available name */ - state->filter = talloc_asprintf(state, - "(&(objectclass=%s)(%s=*)", - ctx->opts->group_map[SDAP_OC_GROUP].name, + oc_list = sdap_make_oc_list(state, ctx->opts->group_map); + if (oc_list == NULL) { + DEBUG(SSSDBG_CRIT_FAILURE, "Failed to create objectClass list.\n"); + ret = ENOMEM; + goto fail; + } + + state->filter = talloc_asprintf(state, "(&(%s)(%s=*)", oc_list, ctx->opts->group_map[SDAP_AT_GROUP_NAME].name); if (!state->filter) { DEBUG(SSSDBG_MINOR_FAILURE, |