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 02d3fc6ce7ff39d290e6e5ba46a77e6b8b85c433..e7e1393fdc855d1d50cd35af92fb1007b1aba539 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;
 
                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;
                                                 mem_ctx, &creds);
                if (!NT_STATUS_IS_OK(status)) {
                        return status;
index efdbb372bd1876aa56dd45a6b89919b8e65e0d79..e1d66ec37f51c42bda608a543251fc4925c98fd6 100644 (file)
@@ -75,6 +75,7 @@ struct samsync_context {
        struct samsync_object *objects;
 
        struct rpc_pipe_client *cli;
        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;
        struct messaging_context *msg_ctx;
 
        const struct samsync_ops *ops;
index 772651f8b2883e3404277f81551f93ad90ebd2a1..6377ad446983ef539ef4d508ddecf286bb5458e8 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->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;
 
        ctx->ops                = &libnet_samsync_display_ops;
        ctx->domain_name        = domain_name;