diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2007-07-26 19:34:12 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2007-07-26 19:34:12 +0000 |
commit | 5f21d0c7bcf5845b53ff94dd054fb1be9692a777 (patch) | |
tree | 0858ef8b84f4df57b6cc025c42b362aca09d9efa /nslcd/ldap-nss.c | |
parent | 0f64fdb18864f3211844742029c5b94c5b6c48c2 (diff) |
switch to the new attribute mapping code
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@331 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd/ldap-nss.c')
-rw-r--r-- | nslcd/ldap-nss.c | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/nslcd/ldap-nss.c b/nslcd/ldap-nss.c index 76dd9b8..b61f55d 100644 --- a/nslcd/ldap-nss.c +++ b/nslcd/ldap-nss.c @@ -2914,57 +2914,6 @@ int has_objectclass(LDAPMessage *entry,const char *objectclass) return 0; } -static enum nss_status -_nss_ldap_map_get (enum ldap_map_selector sel, - enum ldap_map_type type, - const char *from, const char **to); - -const char * -_nss_ldap_map_at (enum ldap_map_selector sel, const char *attribute) -{ - const char *mapped = NULL; - enum nss_status stat; - - stat = _nss_ldap_map_get (sel, MAP_ATTRIBUTE, attribute, &mapped); - - return (stat == NSS_STATUS_SUCCESS) ? mapped : attribute; -} - -const char * -_nss_ldap_map_oc (enum ldap_map_selector sel, const char *objectclass) -{ - const char *mapped = NULL; - enum nss_status stat; - - stat = _nss_ldap_map_get (sel, MAP_OBJECTCLASS, objectclass, &mapped); - - return (stat == NSS_STATUS_SUCCESS) ? mapped : objectclass; -} - -static enum nss_status -_nss_ldap_map_get (enum ldap_map_selector sel, - enum ldap_map_type type, - const char *from, const char **to) -{ - DICT *map; - if (_nss_ldap_map_get == NULL || sel > LM_NONE || type > MAP_MAX) - return NSS_STATUS_NOTFOUND; - map=nslcd_cfg->ldc_maps[sel][type]; - if (map!=NULL) - { - *to=(const char *)dict_get(map,from); - if ((*to==NULL) && (sel!=LM_NONE)) - { - map=nslcd_cfg->ldc_maps[LM_NONE][type]; - if (map!=NULL) - *to=(const char *)dict_get(map,from); - } - } - if (*to==NULL) - return NSS_STATUS_NOTFOUND; - return NSS_STATUS_SUCCESS; -} - /* * Proxy bind support for AIX. Very simple, but should do * the job. |