diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2013-03-29 15:14:21 +0100 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2013-03-29 15:14:46 +0100 |
commit | 7d1e492f8099ecd3b71574e8b8973d44591255df (patch) | |
tree | 8435bc786cf4797ba82094e9e88f56cb883ec62c | |
parent | 302c2fab5dd647aa5f4d3afd58e99fa274a7f08e (diff) |
Also perform authentication search using LDAPSearch class
-rw-r--r-- | pynslcd/pam.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pynslcd/pam.py b/pynslcd/pam.py index 4009d71..5c2f629 100644 --- a/pynslcd/pam.py +++ b/pynslcd/pam.py @@ -58,7 +58,8 @@ def try_bind(binddn, password): elif ctrl.graceAuthNsRemaining is not None: return constants.NSLCD_PAM_NEW_AUTHTOK_REQD, 'Password expired, %d grace logins left' % ctrl.graceAuthNsRemaining # perform search for own object (just to do any kind of search) - results = conn.search_s(binddn, ldap.SCOPE_BASE, '(objectClass=*)', ['dn', ]) + results = search.LDAPSearch(conn, base=binddn, scope=ldap.SCOPE_BASE, + filter='(objectClass=*)', attributes=['dn', ]) for entry in results: if entry[0] == binddn: return constants.NSLCD_PAM_SUCCESS, '' |