s3: libads: Don't re-do DNS lookups in ads_current_time() if not needed.
authorJeremy Allison <jra@samba.org>
Thu, 23 Jul 2020 02:00:52 +0000 (19:00 -0700)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 18 Aug 2020 08:25:39 +0000 (08:25 +0000)
commit1d066f37b9217a475b6b84a935ad51fbec88fe04
tree46b6032415c6e721f4ccf8523982c2c46e9b9a1c
parentc863cc2ba34025731a18ac735f714b5b888504da
s3: libads: Don't re-do DNS lookups in ads_current_time() if not needed.

ADS_STRUCT may be being reused after a
DC lookup from ads_find_dc(), so ads->ldap.ss may already have a
good address (even if ads->server.ldap_server == NULL).
Only re-initialize the ADS_STRUCT and redo the ads_find_fc()
DNS lookups if we have to.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/libads/ldap.c