summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsource3/libads/ldap.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index 647cdbd0459..6caeebe6037 100755
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -3305,6 +3305,13 @@ ADS_STATUS ads_current_time(ADS_STRUCT *ads)
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))