diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2010-09-13 11:45:42 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-09-22 09:55:24 -0400 |
commit | 7fce06bb1a855126e41042e0dc22bf2b2d6cec28 (patch) | |
tree | 54f671050e5a5752ea492c168d6edf5b5b5ba80a /src/providers/ldap/sdap_async_accounts.c | |
parent | 6c188d847dfcd2778d134d5a0f80ecbce53e7b57 (diff) | |
download | sssd-7fce06bb1a855126e41042e0dc22bf2b2d6cec28.tar.gz sssd-7fce06bb1a855126e41042e0dc22bf2b2d6cec28.tar.bz2 sssd-7fce06bb1a855126e41042e0dc22bf2b2d6cec28.zip |
Request all group attributes during initgroups processing
We tried to be too clever and only requested the name of the group,
but we require the objectClass to validate the results.
https://fedorahosted.org/sssd/ticket/622
Diffstat (limited to 'src/providers/ldap/sdap_async_accounts.c')
-rw-r--r-- | src/providers/ldap/sdap_async_accounts.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/providers/ldap/sdap_async_accounts.c b/src/providers/ldap/sdap_async_accounts.c index 8999ba01..4db4a4cc 100644 --- a/src/providers/ldap/sdap_async_accounts.c +++ b/src/providers/ldap/sdap_async_accounts.c @@ -1042,7 +1042,8 @@ struct tevent_req *sdap_initgr_rfc2307_send(TALLOC_CTX *memctx, struct tevent_req *req, *subreq; struct sdap_initgr_rfc2307_state *state; const char *filter; - const char *attrs[2]; + const char **attrs; + errno_t ret; req = tevent_req_create(memctx, &state, struct sdap_initgr_rfc2307_state); if (!req) return NULL; @@ -1059,12 +1060,12 @@ struct tevent_req *sdap_initgr_rfc2307_send(TALLOC_CTX *memctx, return NULL; } - attrs[0] = talloc_strdup(state, opts->group_map[SDAP_AT_GROUP_NAME].name); - if (!attrs[0]) { - talloc_zfree(req); + ret = build_attrs_from_map(state, opts->group_map, + SDAP_OPTS_GROUP, &attrs); + if (ret != EOK) { + talloc_free(req); return NULL; } - attrs[1] = NULL; filter = talloc_asprintf(state, "(&(%s=%s)(objectclass=%s))", opts->group_map[SDAP_AT_GROUP_MEMBER].name, |