summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-10-13 07:25:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:20:59 -0500
commit9ce0de670bc3a19a189fe45442b929ad0f2ec3b5 (patch)
tree7229b60b221d6be91187f74d28dff01e43600533 /source4
parent28b6ae90765bc83446f42fade34105e479eff2d5 (diff)
downloadsamba-9ce0de670bc3a19a189fe45442b929ad0f2ec3b5.tar.gz
samba-9ce0de670bc3a19a189fe45442b929ad0f2ec3b5.tar.bz2
samba-9ce0de670bc3a19a189fe45442b929ad0f2ec3b5.zip
r19261: Fix use of unitialised variables. (The binding string is used, if not
NULL). This showed up in a manual pre-TP3 test of the 'net samdump' code, and shows the critical need for the windows testing infrustructure on the build farm. Andrew Bartlett (This used to be commit 9cef40779ad987b506b1f514a67b5b1c8aea9969)
Diffstat (limited to 'source4')
-rw-r--r--source4/libnet/libnet_join.c2
-rw-r--r--source4/libnet/libnet_vampire.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c
index 14e3e5b719..5781bc19c2 100644
--- a/source4/libnet/libnet_join.c
+++ b/source4/libnet/libnet_join.c
@@ -460,9 +460,11 @@ NTSTATUS libnet_JoinDomain(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, stru
/* prepare connect to the LSA pipe of PDC */
if (r->in.level == LIBNET_JOINDOMAIN_AUTOMATIC) {
+ connect_with_info->in.binding = NULL;
connect_with_info->in.name = r->in.domain_name;
} else {
connect_with_info->in.binding = r->in.binding;
+ connect_with_info->in.name = NULL;
}
connect_with_info->level = LIBNET_RPC_CONNECT_DC_INFO;
diff --git a/source4/libnet/libnet_vampire.c b/source4/libnet/libnet_vampire.c
index 7421f8943c..f5a326c676 100644
--- a/source4/libnet/libnet_vampire.c
+++ b/source4/libnet/libnet_vampire.c
@@ -202,8 +202,9 @@ NTSTATUS libnet_SamSync_netlogon(struct libnet_context *ctx, TALLOC_CTX *mem_ctx
c->level = LIBNET_RPC_CONNECT_DC_INFO;
if (r->in.binding_string) {
c->in.binding = r->in.binding_string;
-
+ c->in.name = NULL;
} else {
+ c->in.binding = NULL;
c->in.name = cli_credentials_get_domain(machine_account);
}