summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap.h
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-07-31 10:59:43 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-06-03 11:31:59 +0200
commit2969084519478a5ad75ba44d6039941216a7572c (patch)
treee0c1f6f660a50f2b46dda982aec779e5fc4d2203 /src/providers/ldap/sdap.h
parent7f42b25ce49b818b534015d078bd51ee612c465c (diff)
downloadsssd-2969084519478a5ad75ba44d6039941216a7572c.tar.gz
sssd-2969084519478a5ad75ba44d6039941216a7572c.tar.xz
sssd-2969084519478a5ad75ba44d6039941216a7572c.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.h')
-rw-r--r--src/providers/ldap/sdap.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/providers/ldap/sdap.h b/src/providers/ldap/sdap.h
index 460f40056..7f8911744 100644
--- a/src/providers/ldap/sdap.h
+++ b/src/providers/ldap/sdap.h
@@ -159,6 +159,7 @@ enum sdap_basic_opt {
SDAP_USER_SEARCH_BASE,
SDAP_USER_SEARCH_SCOPE,
SDAP_USER_SEARCH_FILTER,
+ SDAP_USER_EXTRA_ATTRS,
SDAP_GROUP_SEARCH_BASE,
SDAP_GROUP_SEARCH_SCOPE,
SDAP_GROUP_SEARCH_FILTER,
@@ -412,6 +413,7 @@ struct sdap_options {
struct dp_option *basic;
struct sdap_attr_map *gen_map;
struct sdap_attr_map *user_map;
+ size_t user_map_cnt;
struct sdap_attr_map *group_map;
struct sdap_attr_map *netgroup_map;
struct sdap_attr_map *service_map;
@@ -467,6 +469,13 @@ int sdap_copy_map(TALLOC_CTX *memctx,
int num_entries,
struct sdap_attr_map **_map);
+int sdap_extend_map(TALLOC_CTX *memctx,
+ struct sdap_attr_map *src_map,
+ size_t num_entries,
+ char **extra_attrs,
+ struct sdap_attr_map **_map,
+ size_t *_new_size);
+
int sdap_get_map(TALLOC_CTX *memctx,
struct confdb_ctx *cdb,
const char *conf_path,