lists.arthurdejong.org
RSS feed

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

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

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



Author: jhrozek
Date: Mon Jan  9 12:54:36 2012
New Revision: 1589
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1589&view=revision

Log:
Return from update_username() if myldap_get_values() returns invalid value

If myldap_get_values() failed for the attmap_passwd_uid, nss-pam-ldapd
would dereference a NULL pointer.

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

Modified: nss-pam-ldapd/nslcd/pam.c
==============================================================================
--- nss-pam-ldapd/nslcd/pam.c   Fri Jan  6 14:59:50 2012        (r1588)
+++ nss-pam-ldapd/nslcd/pam.c   Mon Jan  9 12:54:36 2012        (r1589)
@@ -118,8 +118,11 @@
     /* get the username from the uid attribute */
     values=myldap_get_values(entry,attmap_passwd_uid);
     if ((values==NULL)||(values[0]==NULL))
+    {
       log_log(LOG_WARNING,"%s: %s: missing",
                           myldap_get_dn(entry),attmap_passwd_uid);
+      return;
+    }
     value=values[0];
   }
   /* check the username */
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/