]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r19261: Fix use of unitialised variables. (The binding string is used, if not
authorAndrew Bartlett <abartlet@samba.org>
Fri, 13 Oct 2006 07:25:51 +0000 (07:25 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:20:59 +0000 (14:20 -0500)
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)

source4/libnet/libnet_join.c
source4/libnet/libnet_vampire.c

index 14e3e5b719d8ea2ea163ce5cec41ca2a11e7e5b0..5781bc19c28ebc3765572a080b3ce20c20175fc0 100644 (file)
@@ -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;
index 7421f8943c5f688fbba90662ec50eba58d65aa11..f5a326c676df1402d51e20da13f28bde9ba6cffd 100644 (file)
@@ -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);
        }