From 1aaf32c327c61b9e9e0e818f776db960cf162935 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 11 Nov 2019 14:28:06 +0100 Subject: [PATCH] s3:cli_pipe: remove unused cli_rpc_pipe_open_generic_auth() Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- source3/rpc_client/cli_pipe.c | 61 ----------------------------------- source3/rpc_client/cli_pipe.h | 11 ------- 2 files changed, 72 deletions(-) diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index f67869ffd50..8227ef0b0bd 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -3227,67 +3227,6 @@ NTSTATUS cli_rpc_pipe_open_with_creds(struct cli_state *cli, return status; } -/**************************************************************************** - Open a named pipe to an SMB server and bind using the mech specified - - This routine steals the creds pointer that is passed in - ****************************************************************************/ - -NTSTATUS cli_rpc_pipe_open_generic_auth(struct cli_state *cli, - const struct ndr_interface_table *table, - enum dcerpc_transport_t transport, - enum dcerpc_AuthType auth_type, - enum dcerpc_AuthLevel auth_level, - const char *server, - const char *domain, - const char *username, - const char *password, - struct rpc_pipe_client **presult) -{ - struct rpc_pipe_client *result; - struct pipe_auth_data *auth = NULL; - const char *target_service = table->authservices->names[0]; - - NTSTATUS status; - - status = cli_rpc_pipe_open(cli, transport, table, &result); - if (!NT_STATUS_IS_OK(status)) { - return status; - } - - status = rpccli_generic_bind_data(result, - auth_type, auth_level, - server, target_service, - domain, username, password, - CRED_AUTO_USE_KERBEROS, - NULL, - &auth); - if (!NT_STATUS_IS_OK(status)) { - DEBUG(0, ("rpccli_generic_bind_data returned %s\n", - nt_errstr(status))); - goto err; - } - - status = rpc_pipe_bind(result, auth); - if (!NT_STATUS_IS_OK(status)) { - DEBUG(0, ("cli_rpc_pipe_open_generic_auth: cli_rpc_pipe_bind failed with error %s\n", - nt_errstr(status) )); - goto err; - } - - DEBUG(10,("cli_rpc_pipe_open_generic_auth: opened pipe %s to " - "machine %s and bound as user %s\\%s.\n", table->name, - result->desthost, domain, username)); - - *presult = result; - return NT_STATUS_OK; - - err: - - TALLOC_FREE(result); - return status; -} - NTSTATUS cli_rpc_pipe_open_bind_schannel( struct cli_state *cli, const struct ndr_interface_table *table, diff --git a/source3/rpc_client/cli_pipe.h b/source3/rpc_client/cli_pipe.h index de89b227309..636fc4c16d0 100644 --- a/source3/rpc_client/cli_pipe.h +++ b/source3/rpc_client/cli_pipe.h @@ -87,17 +87,6 @@ NTSTATUS cli_rpc_pipe_open_with_creds(struct cli_state *cli, struct cli_credentials *creds, struct rpc_pipe_client **presult); -NTSTATUS cli_rpc_pipe_open_generic_auth(struct cli_state *cli, - const struct ndr_interface_table *table, - enum dcerpc_transport_t transport, - enum dcerpc_AuthType auth_type, - enum dcerpc_AuthLevel auth_level, - const char *server, - const char *domain, - const char *username, - const char *password, - struct rpc_pipe_client **presult); - NTSTATUS cli_rpc_pipe_open_bind_schannel( struct cli_state *cli, const struct ndr_interface_table *table, -- 2.34.1