diff options
author | Tomas Krizek <tkrizek@redhat.com> | 2016-10-06 08:45:43 +0200 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2016-11-07 11:34:03 +0100 |
commit | 60e38ecc7ff6b983f4f3af0a66c08eb3a3fda22d (patch) | |
tree | 98b938d57645632d7bd0a66c1a2e31fc11d29c25 /ipaserver/plugins/ldap2.py | |
parent | de58a5c60596de8b45c8016c3318bac78305477a (diff) | |
download | freeipa-60e38ecc7ff6b983f4f3af0a66c08eb3a3fda22d.tar.gz freeipa-60e38ecc7ff6b983f4f3af0a66c08eb3a3fda22d.tar.xz freeipa-60e38ecc7ff6b983f4f3af0a66c08eb3a3fda22d.zip |
ipaldap: merge external_bind into LDAPClient
* Rename do_external_bind to external_bind
* Remove user_name argument in external_bind() and always set it
to effective user name
https://fedorahosted.org/freeipa/ticket/6461
Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipaserver/plugins/ldap2.py')
-rw-r--r-- | ipaserver/plugins/ldap2.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/ipaserver/plugins/ldap2.py b/ipaserver/plugins/ldap2.py index 1b9057385..9d7c8ccdd 100644 --- a/ipaserver/plugins/ldap2.py +++ b/ipaserver/plugins/ldap2.py @@ -28,7 +28,6 @@ Backend plugin for LDAP. # everything except the CrudBackend methods, where dn is part of the entry dict. import os -import pwd import ldap as _ldap @@ -181,9 +180,7 @@ class ldap2(CrudBackend, LDAPClient): client_controls=clientctrls) elif autobind != AUTOBIND_DISABLED and os.getegid() == 0 and ldapi: try: - pw_name = pwd.getpwuid(os.geteuid()).pw_name - client.external_bind(pw_name, - server_controls=serverctrls, + client.external_bind(server_controls=serverctrls, client_controls=clientctrls) except errors.NotFound: if autobind == AUTOBIND_ENABLED: |