diff options
| author | Stefan Metzmacher <metze@samba.org> | 2013-09-16 19:00:22 +0200 |
|---|---|---|
| committer | Stefan Metzmacher <metze@samba.org> | 2014-01-07 12:47:11 +0100 |
| commit | 3bf77812e80b50f254af64e4935301719f78987e (patch) | |
| tree | ca871dcba26c0455207a7ebf7efb0182f2aad0a4 /source3 | |
| parent | fb13b002d599049f229d2014e1b94f82952b7150 (diff) | |
| download | samba-3bf77812e80b50f254af64e4935301719f78987e.tar.gz samba-3bf77812e80b50f254af64e4935301719f78987e.tar.xz samba-3bf77812e80b50f254af64e4935301719f78987e.zip | |
s3:rpcclient: make use of rpcclient_netlogon_creds instead of cli->netlogon_creds
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3')
| -rw-r--r-- | source3/rpcclient/cmd_netlogon.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/source3/rpcclient/cmd_netlogon.c b/source3/rpcclient/cmd_netlogon.c index 8a865a90db..59e1e4e37a 100644 --- a/source3/rpcclient/cmd_netlogon.c +++ b/source3/rpcclient/cmd_netlogon.c @@ -633,7 +633,11 @@ static NTSTATUS cmd_netlogon_sam_sync(struct rpc_pipe_client *cli, struct netr_DELTA_ENUM_ARRAY *delta_enum_array = NULL; struct netlogon_creds_CredentialState *creds = NULL; - status = netlogon_creds_cli_lock(cli->netlogon_creds, + if (rpcclient_netlogon_creds == NULL) { + return NT_STATUS_UNSUCCESSFUL; + } + + status = netlogon_creds_cli_lock(rpcclient_netlogon_creds, mem_ctx, &creds); if (!NT_STATUS_IS_OK(status)) { return status; @@ -712,7 +716,11 @@ static NTSTATUS cmd_netlogon_sam_deltas(struct rpc_pipe_client *cli, struct netr_DELTA_ENUM_ARRAY *delta_enum_array = NULL; struct netlogon_creds_CredentialState *creds = NULL; - status = netlogon_creds_cli_lock(cli->netlogon_creds, + if (rpcclient_netlogon_creds == NULL) { + return NT_STATUS_UNSUCCESSFUL; + } + + status = netlogon_creds_cli_lock(rpcclient_netlogon_creds, mem_ctx, &creds); if (!NT_STATUS_IS_OK(status)) { return status; @@ -1157,11 +1165,11 @@ static NTSTATUS cmd_netlogon_database_redo(struct rpc_pipe_client *cli, sscanf(argv[1], "%d", &rid); } - if (cli->netlogon_creds == NULL) { + if (rpcclient_netlogon_creds == NULL) { return NT_STATUS_UNSUCCESSFUL; } - status = netlogon_creds_cli_lock(cli->netlogon_creds, + status = netlogon_creds_cli_lock(rpcclient_netlogon_creds, mem_ctx, &creds); if (!NT_STATUS_IS_OK(status)) { return status; @@ -1223,7 +1231,11 @@ static NTSTATUS cmd_netlogon_capabilities(struct rpc_pipe_client *cli, ZERO_STRUCT(return_authenticator); - status = netlogon_creds_cli_lock(cli->netlogon_creds, + if (rpcclient_netlogon_creds == NULL) { + return NT_STATUS_UNSUCCESSFUL; + } + + status = netlogon_creds_cli_lock(rpcclient_netlogon_creds, mem_ctx, &creds); if (!NT_STATUS_IS_OK(status)) { return status; |
