diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2007-02-01 21:51:56 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2007-02-01 21:51:56 +0000 |
commit | 7e126ec34ee493043efc55971135d7e132e2e175 (patch) | |
tree | bf2a764459d1f567e1fe4bf0ae1f0b339c1b0d98 /nslcd/util.c | |
parent | 20481e8d3b817d2f9c560aaf4a56581325ad1572 (diff) |
add new dictionary module and use it for the attribute mapping stuff
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@231 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd/util.c')
-rw-r--r-- | nslcd/util.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/nslcd/util.c b/nslcd/util.c index f067160..17b9f9e 100644 --- a/nslcd/util.c +++ b/nslcd/util.c @@ -74,7 +74,7 @@ dn2uid_cache_put (const char *dn, const char *uid) if (__cache == NULL) { - __cache = (void *)dict_new(); + __cache = (void *)old_dict_new(); if (__cache == NULL) { cache_unlock (); @@ -87,7 +87,7 @@ dn2uid_cache_put (const char *dn, const char *uid) val.data = (void *) uid; val.size = strlen (uid); - status = dict_put (__cache, 0, &key, &val); + status = old_dict_put (__cache, 0, &key, &val); cache_unlock (); @@ -111,7 +111,7 @@ dn2uid_cache_get (const char *dn, char **uid, char **buffer, size_t * buflen) key.data = (void *) dn; key.size = strlen (dn); - status = dict_get (__cache, 0, &key, &val); + status = old_dict_get (__cache, 0, &key, &val); if (status != NSS_STATUS_SUCCESS) { cache_unlock (); @@ -459,7 +459,7 @@ int _nss_ldap_escape_string(const char *src,char *buffer,size_t buflen) return 0; } -struct ldap_dictionary *dict_new(void) +struct ldap_dictionary *old_dict_new(void) { struct ldap_dictionary *dict; dict = malloc(sizeof(struct ldap_dictionary)); @@ -516,7 +516,7 @@ do_dup_datum (unsigned flags, struct ldap_datum * dst, const struct ldap_datum * return NSS_STATUS_SUCCESS; } -enum nss_status dict_get( +enum nss_status old_dict_get( struct ldap_dictionary *db, unsigned flags, const struct ldap_datum *key, @@ -542,7 +542,7 @@ enum nss_status dict_get( return NSS_STATUS_NOTFOUND; } -enum nss_status dict_put( +enum nss_status old_dict_put( struct ldap_dictionary *db, unsigned flags, const struct ldap_datum *key, @@ -565,7 +565,7 @@ enum nss_status dict_put( p=do_find_last(dict); assert(p!=NULL); assert(p->next==NULL); - q=dict_new(); + q=old_dict_new(); if (q==NULL) return NSS_STATUS_TRYAGAIN; } |