summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap_async_initgroups.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-07-31 10:59:43 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-05-02 13:34:50 +0200
commit4dd38025efda88f123eac672f87d3cda12f050c8 (patch)
tree438cb4577369e3fff8e7b5fe5895ad811c422f4b /src/providers/ldap/sdap_async_initgroups.c
parentfcb8e3f1f49bb34c409d8dbd75889eb72be05517 (diff)
downloadsssd-4dd38025efda88f123eac672f87d3cda12f050c8.tar.gz
sssd-4dd38025efda88f123eac672f87d3cda12f050c8.tar.xz
sssd-4dd38025efda88f123eac672f87d3cda12f050c8.zip
LDAP: Make it possible to extend an attribute map
https://fedorahosted.org/sssd/ticket/2073 This commit adds a new option ldap_user_extra_attrs that is unset by default. When set, the option contains a list of LDAP attributes the LDAP provider would download and store in addition to the usual set. The list can either contain LDAP attribute names only, or colon-separated tuples of LDAP attribute and SSSD cache attribute name. In case only LDAP attribute name is specified, the attribute is saved to the cache verbatim. Using a custom SSSD attribute name might be required by environments that configure several SSSD domains with different LDAP schemas. Reviewed-by: Simo Sorce <simo@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Diffstat (limited to 'src/providers/ldap/sdap_async_initgroups.c')
-rw-r--r--src/providers/ldap/sdap_async_initgroups.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/providers/ldap/sdap_async_initgroups.c b/src/providers/ldap/sdap_async_initgroups.c
index 5334ef84d..401ab82dc 100644
--- a/src/providers/ldap/sdap_async_initgroups.c
+++ b/src/providers/ldap/sdap_async_initgroups.c
@@ -2704,7 +2704,9 @@ struct tevent_req *sdap_get_initgr_send(TALLOC_CTX *memctx,
return NULL;
}
- ret = build_attrs_from_map(state, state->opts->user_map, SDAP_OPTS_USER,
+ ret = build_attrs_from_map(state,
+ state->opts->user_map,
+ state->opts->user_map_cnt,
NULL, &state->user_attrs, NULL);
if (ret) {
talloc_zfree(req);
@@ -2752,7 +2754,7 @@ static errno_t sdap_get_initgr_next_base(struct tevent_req *req)
state->user_search_bases[state->user_base_iter]->basedn,
state->user_search_bases[state->user_base_iter]->scope,
state->filter, state->user_attrs,
- state->opts->user_map, SDAP_OPTS_USER,
+ state->opts->user_map, state->opts->user_map_cnt,
state->timeout,
false);
if (!subreq) {