]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:libads: Clear previous CLDAP ping flags when reusing the ADS_STRUCT
authorSamuel Cabrero <scabrero@samba.org>
Tue, 24 May 2022 16:06:47 +0000 (18:06 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 27 Jun 2022 15:50:29 +0000 (15:50 +0000)
Fixes the problem described in commit a26f535dedc651afa2a25dd37113ac71787197ff
but for ads_domain_func_level() function.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libads/ldap.c

index 6caeebe603755085538e190756475628a05b7cd1..4a533c9dc88e297254cad2d55ad59d52017b9701 100755 (executable)
@@ -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))