summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2010-09-13 11:45:42 -0400
committerStephen Gallagher <sgallagh@redhat.com>2010-09-23 13:00:42 -0400
commit538a5fd15c7acbc08e33b72b480c2304902a5bae (patch)
treed3b5e8ec108c1ad88db4b672e76d97b72fc210cd /src
parentabbfb6ee1c6abaf309450a43e77535c4226c560d (diff)
downloadsssd-538a5fd15c7acbc08e33b72b480c2304902a5bae.tar.gz
sssd-538a5fd15c7acbc08e33b72b480c2304902a5bae.tar.xz
sssd-538a5fd15c7acbc08e33b72b480c2304902a5bae.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')
-rw-r--r--src/providers/ldap/sdap_async_accounts.c11
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 beab326a0..d83a9dcf3 100644
--- a/src/providers/ldap/sdap_async_accounts.c
+++ b/src/providers/ldap/sdap_async_accounts.c
@@ -1508,7 +1508,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;
@@ -1525,12 +1526,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,