summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap_async_initgroups.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/sdap_async_initgroups.c
parente2a59ba258ab98a6f50a1af627bc4cdceaa59101 (diff)
downloadsssd-ca4b7b92738f3dd463914e3de5757cd98d37a983.tar.gz
sssd-ca4b7b92738f3dd463914e3de5757cd98d37a983.tar.xz
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/sdap_async_initgroups.c')
-rw-r--r--src/providers/ldap/sdap_async_initgroups.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/providers/ldap/sdap_async_initgroups.c b/src/providers/ldap/sdap_async_initgroups.c
index 8ca738782..b883ccf93 100644
--- a/src/providers/ldap/sdap_async_initgroups.c
+++ b/src/providers/ldap/sdap_async_initgroups.c
@@ -354,7 +354,7 @@ struct tevent_req *sdap_initgr_rfc2307_send(TALLOC_CTX *memctx,
}
ret = build_attrs_from_map(state, opts->group_map,
- SDAP_OPTS_GROUP, &state->attrs);
+ SDAP_OPTS_GROUP, &state->attrs, NULL);
if (ret != EOK) {
talloc_free(req);
return NULL;
@@ -844,7 +844,7 @@ static errno_t sdap_initgr_nested_deref_search(struct tevent_req *req)
maps[1].map = NULL;
ret = build_attrs_from_map(state, state->opts->group_map,
- SDAP_OPTS_GROUP, &sdap_attrs);
+ SDAP_OPTS_GROUP, &sdap_attrs, NULL);
if (ret != EOK) goto fail;
timeout = dp_opt_get_int(state->opts->basic, SDAP_SEARCH_TIMEOUT);
@@ -1496,7 +1496,7 @@ static struct tevent_req *sdap_initgr_rfc2307bis_send(
}
ret = build_attrs_from_map(state, opts->group_map,
- SDAP_OPTS_GROUP, &state->attrs);
+ SDAP_OPTS_GROUP, &state->attrs, NULL);
if (ret != EOK) goto done;
ret = sss_filter_sanitize(state, orig_dn, &clean_orig_dn);
@@ -2169,7 +2169,7 @@ static errno_t rfc2307bis_nested_groups_step(struct tevent_req *req)
}
ret = build_attrs_from_map(state, state->opts->group_map,
- SDAP_OPTS_GROUP, &state->attrs);
+ SDAP_OPTS_GROUP, &state->attrs, NULL);
if (ret != EOK) {
goto done;
}
@@ -2505,7 +2505,7 @@ struct tevent_req *sdap_get_initgr_send(TALLOC_CTX *memctx,
}
ret = build_attrs_from_map(state, state->opts->user_map,
- SDAP_OPTS_USER, &state->user_attrs);
+ SDAP_OPTS_USER, &state->user_attrs, NULL);
if (ret) {
talloc_zfree(req);
return NULL;