diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2017-06-17 16:26:16 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2017-06-18 16:46:54 +0200 |
commit | e68b85aac6e4010cacb43a33643f4050f138be7b (patch) | |
tree | ef61b509b8919f4ee3b42daee17ae14e5d49ced4 /nslcd/passwd.c | |
parent | 3d5ab890d3377eb1c344e69992252bebec8a29e6 (diff) |
Fix and clarify a few comments
Diffstat (limited to 'nslcd/passwd.c')
-rw-r--r-- | nslcd/passwd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nslcd/passwd.c b/nslcd/passwd.c index fde4bda..7506ad7 100644 --- a/nslcd/passwd.c +++ b/nslcd/passwd.c @@ -297,7 +297,7 @@ char *dn2uid(MYLDAP_SESSION *session, const char *dn, char *buf, size_t buflen) { if ((cacheentry->uid != NULL) && (strlen(cacheentry->uid) < buflen)) { - /* if the cached entry is still valid, return that */ + /* positive hit: if the cached entry is still valid, return that */ if ((nslcd_cfg->cache_dn2uid_positive > 0) && (time(NULL) < (cacheentry->timestamp + nslcd_cfg->cache_dn2uid_positive))) { @@ -308,9 +308,9 @@ char *dn2uid(MYLDAP_SESSION *session, const char *dn, char *buf, size_t buflen) } else { + /* negative hit: if the cached entry is still valid, return that */ if ((nslcd_cfg->cache_dn2uid_negative > 0) && (time(NULL) < (cacheentry->timestamp + nslcd_cfg->cache_dn2uid_negative))) - /* if the cached entry is still valid, return that */ { pthread_mutex_unlock(&dn2uid_cache_mutex); return NULL; |