From: Stefan Metzmacher Date: Fri, 18 Dec 2015 12:10:58 +0000 (+0100) Subject: s4:libcli/ldap: fix retry authentication after a bad password X-Git-Tag: tdb-1.3.9~347 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=d9d0d2d5a2667ea8984772b678272650a8719c21;p=thirdparty%2Fsamba.git s4:libcli/ldap: fix retry authentication after a bad password We need to start with an empty input buffer. Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett Reviewed-by: Günther Deschner --- diff --git a/source4/libcli/ldap/ldap_bind.c b/source4/libcli/ldap/ldap_bind.c index b10b79d14c0..d2f4ca7e4ac 100644 --- a/source4/libcli/ldap/ldap_bind.c +++ b/source4/libcli/ldap/ldap_bind.c @@ -291,6 +291,8 @@ try_logon_again: gensec session. The logon_retries counter ensures we don't loop forever. */ + data_blob_free(&input); + TALLOC_FREE(conn->gensec); status = gensec_client_start(conn, &conn->gensec, lpcfg_gensec_settings(conn, lp_ctx)); @@ -441,8 +443,6 @@ try_logon_again: new credentials, or get a new ticket if using kerberos */ - talloc_free(conn->gensec); - conn->gensec = NULL; goto try_logon_again; } }