lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1409 - nss-pam-ldapd/pynslcd

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

nss-pam-ldapd commit: r1409 - nss-pam-ldapd/pynslcd



Author: arthur
Date: Thu Mar 24 23:18:31 2011
New Revision: 1409
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?view=rev&revision=1409

Log:
fix the case where the RDN is for some reason not in the cn

Modified:
   nss-pam-ldapd/pynslcd/host.py
   nss-pam-ldapd/pynslcd/network.py

Modified: nss-pam-ldapd/pynslcd/host.py
==============================================================================
--- nss-pam-ldapd/pynslcd/host.py       Thu Mar 24 23:15:12 2011        (r1408)
+++ nss-pam-ldapd/pynslcd/host.py       Thu Mar 24 23:18:31 2011        (r1409)
@@ -43,7 +43,7 @@
             print 'Error: entry %s does not contain %s value' % ( dn, 
self.attmap_cn )
         if not hostname:
             hostname = hostnames.pop(0)
-        else:
+        elif hostname in hostnames:
             hostnames.remove(hostname)
         addresses = attributes.get(self.attmap_ipHostNumber, [])
         if not addresses:

Modified: nss-pam-ldapd/pynslcd/network.py
==============================================================================
--- nss-pam-ldapd/pynslcd/network.py    Thu Mar 24 23:15:12 2011        (r1408)
+++ nss-pam-ldapd/pynslcd/network.py    Thu Mar 24 23:18:31 2011        (r1409)
@@ -43,7 +43,7 @@
             print 'Error: entry %s does not contain %s value' % ( dn, 
self.attmap_cn)
         if not networkname:
             networkname = networknames.pop(0)
-        else:
+        elif networkname in networknames:
             networknames.remove(networkname)
         addresses = attributes.get(self.attmap_ipNetworkNumber, [])
         if not addresses:
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits