diff options
author | Simo Sorce <ssorce@redhat.com> | 2009-10-29 18:16:59 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2009-11-03 10:16:38 -0500 |
commit | a79b644d178fcfbde0fe0b13a31fb13bbfc80004 (patch) | |
tree | 70ae8086c753ad9c1fa08234afed21727c5b1f8a /server/providers/ipa | |
parent | e308325dd002f92d893185f7f655be79afa28be2 (diff) | |
download | sssd-a79b644d178fcfbde0fe0b13a31fb13bbfc80004.tar.gz sssd-a79b644d178fcfbde0fe0b13a31fb13bbfc80004.tar.bz2 sssd-a79b644d178fcfbde0fe0b13a31fb13bbfc80004.zip |
Rename sdap_id_map to sdap_attr_map
Also start adding some infrastructure to use the USN counter when available.
In particular add a place to add generic attrs mapping, ie attributes that are
neither user nor group specific.
Diffstat (limited to 'server/providers/ipa')
-rw-r--r-- | server/providers/ipa/ipa_common.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/server/providers/ipa/ipa_common.c b/server/providers/ipa/ipa_common.c index 3f4d25de..a571aead 100644 --- a/server/providers/ipa/ipa_common.c +++ b/server/providers/ipa/ipa_common.c @@ -63,7 +63,12 @@ struct dp_option ipa_def_ldap_opts[] = { { "krb5_realm", DP_OPT_STRING, NULL_STRING, NULL_STRING } }; -struct sdap_id_map ipa_user_map[] = { +struct sdap_attr_map ipa_attr_map[] = { + { "ldap_entry_usn", "entryUSN", SYSDB_USN, NULL }, + { "ldap_rootdse_last_usn", "lastUSN", SYSDB_HIGH_USN, NULL } +}; + +struct sdap_attr_map ipa_user_map[] = { { "ldap_user_object_class", "posixAccount", SYSDB_USER_CLASS, NULL }, { "ldap_user_name", "uid", SYSDB_NAME, NULL }, { "ldap_user_pwd", "userPassword", SYSDB_PWD, NULL }, @@ -89,7 +94,7 @@ struct sdap_id_map ipa_user_map[] = { { "ldap_pwd_attribute", "pwdAttribute", SYSDB_PWD_ATTRIBUTE, NULL } }; -struct sdap_id_map ipa_group_map[] = { +struct sdap_attr_map ipa_group_map[] = { { "ldap_group_object_class", "posixGroup", SYSDB_GROUP_CLASS, NULL }, { "ldap_group_name", "cn", SYSDB_NAME, NULL }, { "ldap_group_pwd", "userPassword", SYSDB_PWD, NULL }, @@ -354,6 +359,14 @@ int ipa_get_id_options(struct ipa_options *ipa_opts, SDAP_GROUP_SEARCH_BASE))); } + ret = sdap_get_map(ipa_opts->id, cdb, conf_path, + ipa_attr_map, + SDAP_AT_GENERAL, + &ipa_opts->id->gen_map); + if (ret != EOK) { + goto done; + } + ret = sdap_get_map(ipa_opts->id, cdb, conf_path, ipa_user_map, |