summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-05-07 21:06:23 +0200
committerGünther Deschner <gd@samba.org>2008-05-09 14:59:19 +0200
commit9adc40a38fd0e5dc0ad9de4654c8bc6a05a19d7b (patch)
treef762f38bbde068ea1bde06e41ef956b74fbabfbf
parent8441681819dcbc54143ac0f590c2795750daa96c (diff)
downloadsamba-9adc40a38fd0e5dc0ad9de4654c8bc6a05a19d7b.tar.gz
samba-9adc40a38fd0e5dc0ad9de4654c8bc6a05a19d7b.tar.bz2
samba-9adc40a38fd0e5dc0ad9de4654c8bc6a05a19d7b.zip
dsgetdcname: simply call ourself with DS_FORCE_REDISCOVERY after cache expiry.
Guenther (This used to be commit 847f258632f6d49a3fd45f466c5d3d8c6222ff85)
-rw-r--r--source3/libsmb/dsgetdcname.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/source3/libsmb/dsgetdcname.c b/source3/libsmb/dsgetdcname.c
index 388c7be395..247cfd3526 100644
--- a/source3/libsmb/dsgetdcname.c
+++ b/source3/libsmb/dsgetdcname.c
@@ -196,22 +196,14 @@ static NTSTATUS dsgetdcname_cache_refresh(TALLOC_CTX *mem_ctx,
const char *site_name,
struct netr_DsRGetDCNameInfo *info)
{
- uint32_t nt_version = NETLOGON_VERSION_1;
-
- /* check if matching entry is older then 15 minutes, if yes, send
- * CLDAP/MAILSLOT ping again and store the cached data */
-
- if (ads_cldap_netlogon(mem_ctx, info->dc_unc,
- info->domain_name, &nt_version, NULL)) {
-
- dsgetdcname_cache_delete(mem_ctx, domain_name);
-
- return dsgetdcname_cache_store(mem_ctx,
- info->domain_name,
- info);
- }
-
- return NT_STATUS_INVALID_NETWORK_RESPONSE;
+ struct netr_DsRGetDCNameInfo *dc_info;
+
+ return dsgetdcname(mem_ctx,
+ domain_name,
+ domain_guid,
+ site_name,
+ flags | DS_FORCE_REDISCOVERY,
+ &dc_info);
}
/****************************************************************