diff options
author | Volker Lendecke <vl@samba.org> | 2008-07-20 11:04:31 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-07-20 17:37:13 +0200 |
commit | 52ff49600e6421828784a9e9aefbd1e94a290ed0 (patch) | |
tree | cea859009502d85e3537a7d7148e94bf832c3abe /source3 | |
parent | ba2cb35ca5b335a8f33e012255b43b9cf9a04ecf (diff) | |
download | samba-52ff49600e6421828784a9e9aefbd1e94a290ed0.tar.gz samba-52ff49600e6421828784a9e9aefbd1e94a290ed0.tar.bz2 samba-52ff49600e6421828784a9e9aefbd1e94a290ed0.zip |
Refactoring: Change calling conventions for cli_rpc_pipe_open_ntlmssp_auth_schannel
Pass in ndr_syntax_id instead of pipe_idx, return NTSTATUS
(This used to be commit ff87127baf1d1bd62bb9c1be4a50c2ab2642b33d)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 14 | ||||
-rw-r--r-- | source3/rpc_client/cli_pipe.c | 32 |
2 files changed, 25 insertions, 21 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index 98b2166984..bdbbdd7f51 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -7128,13 +7128,13 @@ NTSTATUS cli_rpc_pipe_open_schannel_with_key(struct cli_state *cli, const char *domain, const struct dcinfo *pdc, struct rpc_pipe_client **presult); -struct rpc_pipe_client *cli_rpc_pipe_open_ntlmssp_auth_schannel(struct cli_state *cli, - int pipe_idx, - enum pipe_auth_level auth_level, - const char *domain, - const char *username, - const char *password, - NTSTATUS *perr); +NTSTATUS cli_rpc_pipe_open_ntlmssp_auth_schannel(struct cli_state *cli, + const struct ndr_syntax_id *interface, + enum pipe_auth_level auth_level, + const char *domain, + const char *username, + const char *password, + struct rpc_pipe_client **presult); struct rpc_pipe_client *cli_rpc_pipe_open_schannel(struct cli_state *cli, int pipe_idx, enum pipe_auth_level auth_level, diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index abafa0ff26..5441ab8807 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -3328,35 +3328,39 @@ static NTSTATUS get_schannel_session_key_auth_ntlmssp(struct cli_state *cli, uses an ntlmssp bind to get the session key. ****************************************************************************/ -struct rpc_pipe_client *cli_rpc_pipe_open_ntlmssp_auth_schannel(struct cli_state *cli, - int pipe_idx, - enum pipe_auth_level auth_level, - const char *domain, - const char *username, - const char *password, - NTSTATUS *perr) +NTSTATUS cli_rpc_pipe_open_ntlmssp_auth_schannel(struct cli_state *cli, + const struct ndr_syntax_id *interface, + enum pipe_auth_level auth_level, + const char *domain, + const char *username, + const char *password, + struct rpc_pipe_client **presult) { uint32_t neg_flags = NETLOGON_NEG_AUTH2_ADS_FLAGS; struct rpc_pipe_client *netlogon_pipe = NULL; struct rpc_pipe_client *result = NULL; + NTSTATUS status; - *perr = get_schannel_session_key_auth_ntlmssp( + status = get_schannel_session_key_auth_ntlmssp( cli, domain, username, password, &neg_flags, &netlogon_pipe); - if (!NT_STATUS_IS_OK(*perr)) { + if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("cli_rpc_pipe_open_ntlmssp_auth_schannel: failed to get schannel session " "key from server %s for domain %s.\n", cli->desthost, domain )); - return NULL; + return status; } - *perr = cli_rpc_pipe_open_schannel_with_key( - cli, cli_get_iface(pipe_idx), auth_level, - domain, netlogon_pipe->dc, &result); + status = cli_rpc_pipe_open_schannel_with_key( + cli, interface, auth_level, domain, netlogon_pipe->dc, + &result); /* Now we've bound using the session key we can close the netlog pipe. */ TALLOC_FREE(netlogon_pipe); - return result; + if (NT_STATUS_IS_OK(status)) { + *presult = result; + } + return status; } /**************************************************************************** |