lists.arthurdejong.org
RSS feed

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

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

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



Author: arthur
Date: Fri May  4 22:10:48 2012
New Revision: 1681
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1681&view=revision

Log:
ensure search also works without attribute map

Modified:
   nss-pam-ldapd/pynslcd/common.py

Modified: nss-pam-ldapd/pynslcd/common.py
==============================================================================
--- nss-pam-ldapd/pynslcd/common.py     Fri May  4 22:06:31 2012        (r1680)
+++ nss-pam-ldapd/pynslcd/common.py     Fri May  4 22:10:48 2012        (r1681)
@@ -63,6 +63,7 @@
       case_insensitive - check that these attributes are present in the
                          response if they were in the request
       limit_attributes - override response attributes with request attributes
+                         (ensure that only one copy of the value is returned)
       required - attributes that are required
       canonical_first - search the DN for these attributes and ensure that
                         they are listed first in the attribute values
@@ -136,7 +137,8 @@
         """Handle an entry with the specified attributes, filtering it with
         the request parameters where needed."""
         # translate the attributes using the attribute mapping
-        attributes = self.attmap.translate(attributes)
+        if self.attmap:
+            attributes = self.attmap.translate(attributes)
         # make sure value from DN is first value
         for attr in self.canonical_first:
             primary_value = self.attmap.get_rdn_value(dn, attr)
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/