summaryrefslogtreecommitdiff
path: root/src/providers/ldap/ldap_id.c
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2012-05-08 13:37:14 -0400
committerStephen Gallagher <sgallagh@redhat.com>2012-05-10 11:34:46 -0400
commitca4b7b92738f3dd463914e3de5757cd98d37a983 (patch)
treeb7b781eabeed9a096fca59df8d836418ac3a41b7 /src/providers/ldap/ldap_id.c
parente2a59ba258ab98a6f50a1af627bc4cdceaa59101 (diff)
downloadsssd-ca4b7b92738f3dd463914e3de5757cd98d37a983.tar.gz
sssd-ca4b7b92738f3dd463914e3de5757cd98d37a983.tar.bz2
sssd-ca4b7b92738f3dd463914e3de5757cd98d37a983.zip
LDAP: Add attr_count return value to build_attrs_from_map()
This is necessary because in several places in the code, we are appending to the attrs returned from this value, and if we relied on the map size macro, we would be appending after the NULL terminator if one or more attributes were defined as NULL.
Diffstat (limited to 'src/providers/ldap/ldap_id.c')
-rw-r--r--src/providers/ldap/ldap_id.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/providers/ldap/ldap_id.c b/src/providers/ldap/ldap_id.c
index 18635869..bdd640a9 100644
--- a/src/providers/ldap/ldap_id.c
+++ b/src/providers/ldap/ldap_id.c
@@ -152,7 +152,7 @@ struct tevent_req *users_get_send(TALLOC_CTX *memctx,
/* TODO: handle attrs_type */
ret = build_attrs_from_map(state, ctx->opts->user_map,
- SDAP_OPTS_USER, &state->attrs);
+ SDAP_OPTS_USER, &state->attrs, NULL);
if (ret != EOK) goto fail;
ret = users_get_retry(req);
@@ -440,7 +440,7 @@ struct tevent_req *groups_get_send(TALLOC_CTX *memctx,
/* TODO: handle attrs_type */
ret = build_attrs_from_map(state, ctx->opts->group_map,
- SDAP_OPTS_GROUP, &state->attrs);
+ SDAP_OPTS_GROUP, &state->attrs, NULL);
if (ret != EOK) goto fail;
ret = groups_get_retry(req);
@@ -632,7 +632,7 @@ static struct tevent_req *groups_by_user_send(TALLOC_CTX *memctx,
state->name = name;
ret = build_attrs_from_map(state, ctx->opts->group_map,
- SDAP_OPTS_GROUP, &state->attrs);
+ SDAP_OPTS_GROUP, &state->attrs, NULL);
if (ret != EOK) goto fail;
ret = groups_by_user_retry(req);