From 4ec237854992d2b26fce87a15f9d16522028b8a1 Mon Sep 17 00:00:00 2001 From: stroeder Date: Mon, 4 Sep 2017 14:59:12 +0000 Subject: [PATCH] fixed passing all arguments from LDAPObject.sasl_non_interactive_bind_s() to LDAPObject.sasl_interactive_bind_s() --- CHANGES | 5 +++-- Lib/ldap/ldapobject.py | 12 +++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/CHANGES b/CHANGES index bd831d2..5384a13 100644 --- a/CHANGES +++ b/CHANGES @@ -4,7 +4,8 @@ Released 2.4.43 2017-09-xx Changes since 2.4.42: Lib/ -* +* fixed passing all arguments from LDAPObject.sasl_non_interactive_bind_s() + to LDAPObject.sasl_interactive_bind_s() Tests/ * @@ -1487,4 +1488,4 @@ Released 2.0.0pre02 2002-02-01 ---------------------------------------------------------------- Released 1.10alpha3 2000-09-19 -$Id: CHANGES,v 1.459 2017/09/04 14:56:11 stroeder Exp $ +$Id: CHANGES,v 1.460 2017/09/04 14:59:12 stroeder Exp $ diff --git a/Lib/ldap/ldapobject.py b/Lib/ldap/ldapobject.py index b6b39f2..1289914 100644 --- a/Lib/ldap/ldapobject.py +++ b/Lib/ldap/ldapobject.py @@ -3,7 +3,7 @@ See https://www.python-ldap.org/ for details. -\$Id: ldapobject.py,v 1.164 2017/08/15 16:21:58 stroeder Exp $ +\$Id: ldapobject.py,v 1.165 2017/09/04 14:59:12 stroeder Exp $ Compability: - Tested with Python 2.0+ but should work with Python 1.5.x @@ -253,13 +253,11 @@ def sasl_non_interactive_bind_s(self,sasl_mech,serverctrls=None,clientctrls=None """ Send a SASL bind request using a non-interactive SASL method (e.g. GSSAPI, EXTERNAL) """ - self.sasl_interactive_bind_s( - '', - ldap.sasl.sasl( - {ldap.sasl.CB_USER:authz_id}, - sasl_mech - ) + auth = ldap.sasl.sasl( + {ldap.sasl.CB_USER:authz_id}, + sasl_mech ) + self.sasl_interactive_bind_s('',auth,serverctrls,clientctrls,sasl_flags) def sasl_external_bind_s(self,serverctrls=None,clientctrls=None,sasl_flags=ldap.SASL_QUIET,authz_id=''): """