lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1771 - nss-pam-ldapd/nslcd

[Date Prev][Date Next] [Thread Prev][Thread Next]

nss-pam-ldapd commit: r1771 - nss-pam-ldapd/nslcd



Author: arthur
Date: Sun Sep 16 17:57:02 2012
New Revision: 1771
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1771&view=revision

Log:
fix problem storing negative hit to dn2uid cache (thanks scan-build)

Modified:
   nss-pam-ldapd/nslcd/passwd.c

Modified: nss-pam-ldapd/nslcd/passwd.c
==============================================================================
--- nss-pam-ldapd/nslcd/passwd.c        Sun Sep 16 17:51:39 2012        (r1770)
+++ nss-pam-ldapd/nslcd/passwd.c        Sun Sep 16 17:57:02 2012        (r1771)
@@ -324,7 +324,7 @@
     /* copy the uid if needed */
     if (cacheentry->uid==NULL)
       cacheentry->uid=uid!=NULL?strdup(uid):NULL;
-    else if (strcmp(cacheentry->uid,uid)!=0)
+    else if ((uid==NULL)||(strcmp(cacheentry->uid,uid)!=0))
     {
       free(cacheentry->uid);
       cacheentry->uid=uid!=NULL?strdup(uid):NULL;
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/