diff options
author | Petr Viktorin <pviktori@redhat.com> | 2013-01-21 06:43:29 -0500 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2013-03-01 16:59:44 +0100 |
commit | 8be8d4ebfd876aba109ea133efe11d2386564f3b (patch) | |
tree | 2ce30f81c461ae87a8329579704363e2ca48aa06 /ipaserver/ipaldap.py | |
parent | 1960945e28e467c18454f27e0839d124473a68cc (diff) | |
download | freeipa.git-8be8d4ebfd876aba109ea133efe11d2386564f3b.tar.gz freeipa.git-8be8d4ebfd876aba109ea133efe11d2386564f3b.tar.xz freeipa.git-8be8d4ebfd876aba109ea133efe11d2386564f3b.zip |
Remove dbdir, binddn, bindpwd from IPAdmin
The dbdir logic was moved to replication.py, the only caller.
The binddn and bindpwd attributes were unused.
Part of the work for: https://fedorahosted.org/freeipa/ticket/2660
Diffstat (limited to 'ipaserver/ipaldap.py')
-rw-r--r-- | ipaserver/ipaldap.py | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/ipaserver/ipaldap.py b/ipaserver/ipaldap.py index 30c6cfda..a84f8fac 100644 --- a/ipaserver/ipaldap.py +++ b/ipaserver/ipaldap.py @@ -20,8 +20,6 @@ # import sys -import os -import os.path import string import time import shutil @@ -1567,18 +1565,6 @@ class IPAdmin(LDAPConnection): self.conn = IPASimpleLDAPObject(ldap_uri, force_schema_updates=True) - def __lateinit(self): - """ - This is executed after the connection is bound to fill in some useful - values. - """ - with self.error_handler(): - ent = self.getEntry(DN(('cn', 'config'), ('cn', 'ldbm database'), ('cn', 'plugins'), ('cn', 'config')), - ldap.SCOPE_BASE, '(objectclass=*)', - [ 'nsslapd-directory' ]) - - self.dbdir = os.path.dirname(ent.getValue('nsslapd-directory')) - def __str__(self): return self.host + ":" + str(self.port) @@ -1604,20 +1590,18 @@ class IPAdmin(LDAPConnection): raise e bind_func(*args, **kwargs) - def do_simple_bind(self, binddn=DN(('cn', 'directory manager')), bindpw="", timeout=DEFAULT_TIMEOUT): - self.binddn = binddn # FIXME, self.binddn & self.bindpwd never referenced. - self.bindpwd = bindpw + def do_simple_bind(self, binddn=DN(('cn', 'directory manager')), bindpw="", + timeout=DEFAULT_TIMEOUT): self.__bind_with_wait(self.simple_bind_s, timeout, binddn, bindpw) - self.__lateinit() def do_sasl_gssapi_bind(self, timeout=DEFAULT_TIMEOUT): - self.__bind_with_wait(self.sasl_interactive_bind_s, timeout, None, SASL_AUTH) - self.__lateinit() + self.__bind_with_wait( + self.sasl_interactive_bind_s, timeout, None, SASL_AUTH) def do_external_bind(self, user_name=None, timeout=DEFAULT_TIMEOUT): auth_tokens = ldap.sasl.external(user_name) - self.__bind_with_wait(self.sasl_interactive_bind_s, timeout, None, auth_tokens) - self.__lateinit() + self.__bind_with_wait( + self.sasl_interactive_bind_s, timeout, None, auth_tokens) def getEntry(self, base, scope, filterstr='(objectClass=*)', attrlist=None): |