diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2011-05-01 12:14:54 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2011-05-01 12:14:54 +0000 |
commit | 13ddc63d947d11106a4183604017f9ae57bffe41 (patch) | |
tree | da0d4d4c28a12bb687fb637cae179b3121603e74 /pynslcd/common.py | |
parent | c537c3acc5727a65dd41f94182391365ce022d27 (diff) |
pass dn and attributes to functions separately
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1452 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'pynslcd/common.py')
-rw-r--r-- | pynslcd/common.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pynslcd/common.py b/pynslcd/common.py index 1b1f2cb..0440272 100644 --- a/pynslcd/common.py +++ b/pynslcd/common.py @@ -95,7 +95,7 @@ class Request(object): res = self.conn.search_s(base, self.scope, self.mk_filter(), self.attributes) for entry in res: if entry[0]: - self.write(entry) + self.write(entry[0], entry[1]) except ldap.NO_SUCH_OBJECT: # FIXME: log message pass @@ -121,6 +121,6 @@ def get_handlers(module): res[cls.action] = cls return res -def get_rdn_value(entry, attribute): +def get_rdn_value(dn, attribute): dn, attributes = entry return dict((x, y) for x, y, z in ldap.dn.str2dn(dn)[0])[attribute] |