summaryrefslogtreecommitdiff
path: root/pynslcd/pam.py
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2013-03-09 21:51:17 +0100
committerArthur de Jong <arthur@arthurdejong.org>2013-03-09 23:27:00 +0100
commitac30060ba57112c23b36cf016f7776e5b6af0d9b (patch)
tree8a6b8950b70262b0d9ddd3bf2ab2eb93f53f045f /pynslcd/pam.py
parent4e603409f76c14ba7b11c437eac6116a2afce603 (diff)
move get_connection function to search module as Connection class as subclass of ReconnectLDAPObject to automatically reconnect to the LDAP server
Diffstat (limited to 'pynslcd/pam.py')
-rw-r--r--pynslcd/pam.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pynslcd/pam.py b/pynslcd/pam.py
index f2493ec..2d03cc9 100644
--- a/pynslcd/pam.py
+++ b/pynslcd/pam.py
@@ -34,7 +34,7 @@ import search
def try_bind(userdn, password):
# open a new connection
- conn = ldap.initialize(cfg.uri)
+ conn = search.Connection()
# bind using the specified credentials
pwctrl = PasswordPolicyControl()
res, data, msgid, ctrls = conn.simple_bind_s(userdn, password, serverctrls=[pwctrl])