diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2013-05-10 23:56:44 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2013-05-10 23:56:44 +0200 |
commit | 97d35f32806b54160767269da9a538b1cebd23db (patch) | |
tree | c1f6666a42346fcd4629d0247ceaf8f14c2117b4 | |
parent | b15dc66dcd4f85e06b112568fe154d3e7c7659da (diff) |
Ignore errors in opening NSS module
-rwxr-xr-x | pynslcd/pynslcd.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pynslcd/pynslcd.py b/pynslcd/pynslcd.py index 99bfda8..df54bad 100755 --- a/pynslcd/pynslcd.py +++ b/pynslcd/pynslcd.py @@ -229,7 +229,10 @@ def acceptconnection(session): def disable_nss_ldap(): """Disable the nss_ldap module to avoid lookup loops.""" import ctypes - lib = ctypes.CDLL(constants.NSS_LDAP_SONAME) + try: + lib = ctypes.CDLL(constants.NSS_LDAP_SONAME) + except OSError: + return # ignore errors in opening NSS module try: ctypes.c_int.in_dll(lib, '_nss_ldap_enablelookups').value = 0 except ValueError: |