s3:cli_pipe: remove unused cli_rpc_pipe_open_generic_auth()
authorStefan Metzmacher <metze@samba.org>
Mon, 11 Nov 2019 13:28:06 +0000 (14:28 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 28 May 2020 06:43:38 +0000 (06:43 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/rpc_client/cli_pipe.c
source3/rpc_client/cli_pipe.h

index f67869ffd503f0884dc165d01d90f9eec4fbf052..8227ef0b0bd1394c6b3d69c781776c53783f5349 100644 (file)
@@ -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,
index de89b227309ffc7d55a91626a36f0d22d7f161b1..636fc4c16d04365c50c85c30d7d905e40439b788 100644 (file)
@@ -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,