summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-05-14 09:42:23 +0200
committerGünther Deschner <gd@samba.org>2008-05-14 09:45:39 +0200
commit5547e5a416109524501c5c5be78efa0f8d10e749 (patch)
tree12b35fb0bf04d8ec3b06bd5c4107da3a91e3e46a /source3
parentc49487805bad03be6a27fc236f60c31dc97ec6ee (diff)
downloadsamba-5547e5a416109524501c5c5be78efa0f8d10e749.tar.gz
samba-5547e5a416109524501c5c5be78efa0f8d10e749.tar.bz2
samba-5547e5a416109524501c5c5be78efa0f8d10e749.zip
dsgetdcname: In case we didn't get a mailslot reply, don't cache the nodestatus.
Guenther (This used to be commit 12e47be02f93e2f41af5772f6a83568b3574d032)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/dsgetdcname.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/libsmb/dsgetdcname.c b/source3/libsmb/dsgetdcname.c
index 30d7c94822..1538502e9a 100644
--- a/source3/libsmb/dsgetdcname.c
+++ b/source3/libsmb/dsgetdcname.c
@@ -1223,6 +1223,7 @@ static NTSTATUS process_dc_netbios(TALLOC_CTX *mem_ctx,
const char *dc_name = NULL;
fstring tmp_dc_name;
union nbt_cldap_netlogon *r = NULL;
+ bool store_cache = false;
uint32_t nt_version = NETLOGON_VERSION_1 |
NETLOGON_VERSION_5 |
NETLOGON_VERSION_5EX_WITH_IP;
@@ -1261,6 +1262,7 @@ static NTSTATUS process_dc_netbios(TALLOC_CTX *mem_ctx,
&nt_version,
&dc_name,
&r)) {
+ store_cache = true;
namecache_store(dc_name, NBT_NAME_SERVER, 1, &ip_list);
goto make_reply;
}
@@ -1302,7 +1304,7 @@ static NTSTATUS process_dc_netbios(TALLOC_CTX *mem_ctx,
status = make_dc_info_from_cldap_reply(mem_ctx, flags, &dclist[i].ss,
nt_version, r, info);
- if (NT_STATUS_IS_OK(status)) {
+ if (NT_STATUS_IS_OK(status) && store_cache) {
return store_cldap_reply(mem_ctx, flags, &dclist[i].ss,
nt_version, r);
}