diff options
author | Martin Kosek <mkosek@redhat.com> | 2012-10-25 16:12:54 +0200 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2012-10-26 12:58:20 -0400 |
commit | f14dd983d1b3d869a296c56e23a848a668dd9a35 (patch) | |
tree | 9863acdeeeb5c656504326cbba286a9a02dd49d3 /ipaserver | |
parent | 3480dbea4c4c2f9fbcd9dbbadedb6c447e1894e2 (diff) | |
download | freeipa.git-f14dd983d1b3d869a296c56e23a848a668dd9a35.tar.gz freeipa.git-f14dd983d1b3d869a296c56e23a848a668dd9a35.tar.xz freeipa.git-f14dd983d1b3d869a296c56e23a848a668dd9a35.zip |
Remove servertrls and clientctrls options from rename_s
python-ldap of version 2.3.10 and lower does not support serverctrls
and clientctrls fir rename_s operation. Do not use these options until
really needed. In that time, we may put a requirement in place, that
minimal python-ldap version is 2.3.11. Also add a notice explaining
why we did this change.
https://fedorahosted.org/freeipa/ticket/3199
Diffstat (limited to 'ipaserver')
-rw-r--r-- | ipaserver/plugins/ldap2.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ipaserver/plugins/ldap2.py b/ipaserver/plugins/ldap2.py index 1a754a55..caf35096 100644 --- a/ipaserver/plugins/ldap2.py +++ b/ipaserver/plugins/ldap2.py @@ -535,12 +535,15 @@ class IPASimpleLDAPObject(object): newpw = self.encode(newpw) return self.conn.passwd_s(dn, oldpw, newpw, serverctrls, clientctrls) - def rename_s(self, dn, newrdn, newsuperior=None, delold=1, serverctrls=None, clientctrls=None): + def rename_s(self, dn, newrdn, newsuperior=None, delold=1): + # NOTICE: python-ldap of version 2.3.10 and lower does not support + # serverctrls and clientctrls for rename_s operation. Thus, these + # options are ommited from this command until really needed assert isinstance(dn, DN) dn = str(dn) assert isinstance(newrdn, (DN, RDN)) newrdn = str(newrdn) - return self.conn.rename_s(dn, newrdn, newsuperior, delold, serverctrls, clientctrls) + return self.conn.rename_s(dn, newrdn, newsuperior, delold) def result(self, msgid=_ldap.RES_ANY, all=1, timeout=None): resp_type, resp_data = self.conn.result(msgid, all, timeout) |