1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s3:libads: Clear previous CLDAP ping flags when reusing the ADS_STRUCT

Fixes the problem described in commit a26f535ded
but for ads_domain_func_level() function.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Samuel Cabrero 2022-05-24 18:06:47 +02:00 committed by Jeremy Allison
parent 5b69b62db4
commit ed89ef46af

View File

@ -3391,6 +3391,13 @@ ADS_STATUS ads_domain_func_level(ADS_STRUCT *ads, uint32_t *val)
goto done;
}
}
/*
* Reset ads->config.flags as it can contain the flags
* returned by the previous CLDAP ping when reusing the struct.
*/
ads_s->config.flags = 0;
ads_s->auth.flags = ADS_AUTH_ANON_BIND;
status = ads_connect( ads_s );
if ( !ADS_ERR_OK(status))