mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
auth/gensec: reset existing context on gensec_start_mech()
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
1d7ffba0be
commit
2aab27fef5
@ -663,6 +663,14 @@ static NTSTATUS gensec_start_mech(struct gensec_security *gensec_security)
|
||||
{
|
||||
NTSTATUS status;
|
||||
|
||||
/*
|
||||
* Callers sometimes just reuse a context, we should
|
||||
* clear the internal state before starting it again.
|
||||
*/
|
||||
talloc_unlink(gensec_security, gensec_security->private_data);
|
||||
gensec_security->private_data = NULL;
|
||||
|
||||
|
||||
if (gensec_security->credentials) {
|
||||
const char *forced_mech = cli_credentials_get_forced_sasl_mech(gensec_security->credentials);
|
||||
if (forced_mech &&
|
||||
|
Loading…
Reference in New Issue
Block a user