s3:libnet: pass in struct netlogon_creds_cli_context from the caller.
authorStefan Metzmacher <metze@samba.org>
Mon, 16 Sep 2013 17:19:39 +0000 (19:19 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 7 Jan 2014 11:47:13 +0000 (12:47 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/libnet/libnet_samsync.c
source3/libnet/libnet_samsync.h
source3/utils/net_rpc_samsync.c

index 02d3fc6..e7e1393 100644 (file)
@@ -216,7 +216,7 @@ static NTSTATUS libnet_samsync_delta(TALLOC_CTX *mem_ctx,
                struct netr_DELTA_ENUM_ARRAY *delta_enum_array = NULL;
                struct netlogon_creds_CredentialState *creds = NULL;
 
-               status = netlogon_creds_cli_lock(ctx->cli->netlogon_creds,
+               status = netlogon_creds_cli_lock(ctx->netlogon_creds,
                                                 mem_ctx, &creds);
                if (!NT_STATUS_IS_OK(status)) {
                        return status;
index efdbb37..e1d66ec 100644 (file)
@@ -75,6 +75,7 @@ struct samsync_context {
        struct samsync_object *objects;
 
        struct rpc_pipe_client *cli;
+       struct netlogon_creds_cli_context *netlogon_creds;
        struct messaging_context *msg_ctx;
 
        const struct samsync_ops *ops;
index 772651f..6377ad4 100644 (file)
@@ -129,6 +129,7 @@ NTSTATUS rpc_samdump_internals(struct net_context *c,
 
        ctx->mode               = NET_SAMSYNC_MODE_DUMP;
        ctx->cli                = pipe_hnd;
+       ctx->netlogon_creds     = c->netlogon_creds;
        ctx->ops                = &libnet_samsync_display_ops;
        ctx->domain_name        = domain_name;