diff options
-rw-r--r-- | nslcd/passwd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/nslcd/passwd.c b/nslcd/passwd.c index da26d88..8ef2a5c 100644 --- a/nslcd/passwd.c +++ b/nslcd/passwd.c @@ -219,6 +219,9 @@ char *dn2uid(MYLDAP_SESSION *session,const char *dn,char *buf,size_t buflen) uid=lookup_dn2uid(session,dn,NULL); /* store the result in the cache */ pthread_mutex_lock(&dn2uid_cache_mutex); + /* try to get the entry from the cache here again because it could have + changed in the meantime */ + cacheentry=dict_get(dn2uid_cache,dn); if (cacheentry==NULL) { /* allocate a new entry in the cache */ |