diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2012-05-04 22:10:48 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2012-05-04 22:10:48 +0200 |
commit | 85e30f2a743ab2ec2a2cccaa55c5cb9f692039b3 (patch) | |
tree | 8cf64aca57548bdb8d2482221ce02ed42155d4bd /pynslcd | |
parent | 4255755168fda15603617e1ee55c484f75760fee (diff) |
ensure search also works without attribute map
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1681 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'pynslcd')
-rw-r--r-- | pynslcd/common.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pynslcd/common.py b/pynslcd/common.py index bded618..3ce0b12 100644 --- a/pynslcd/common.py +++ b/pynslcd/common.py @@ -63,6 +63,7 @@ class Search(object): 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 @@ class Search(object): """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) |