s3:rpc_client: remove unused cli_rpc_pipe_open_schannel_with_key()
authorStefan Metzmacher <metze@samba.org>
Mon, 9 Feb 2015 10:33:05 +0000 (11:33 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 12 Mar 2015 16:13:43 +0000 (17:13 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source3/rpc_client/cli_pipe.c
source3/rpc_client/cli_pipe.h

index db283060148fedb3d0a90fc5aee4a2fa545050e7..915fb78a90ff2d256def0c72f634a2e8fe865245 100644 (file)
@@ -3114,102 +3114,6 @@ NTSTATUS cli_rpc_pipe_open_generic_auth(struct cli_state *cli,
        return status;
 }
 
-/****************************************************************************
- External interface.
- Open a named pipe to an SMB server and bind using schannel (bind type 68)
- using session_key. sign and seal.
-
- The *pdc will be stolen onto this new pipe
- ****************************************************************************/
-
-NTSTATUS cli_rpc_pipe_open_schannel_with_key(struct cli_state *cli,
-                                            const struct ndr_interface_table *table,
-                                            enum dcerpc_transport_t transport,
-                                            const char *domain,
-                                            struct netlogon_creds_cli_context *netlogon_creds,
-                                            struct rpc_pipe_client **_rpccli)
-{
-       struct rpc_pipe_client *rpccli;
-       struct pipe_auth_data *rpcauth;
-       struct netlogon_creds_CredentialState *creds = NULL;
-       enum dcerpc_AuthLevel auth_level;
-       NTSTATUS status;
-       const char *target_service = table->authservices->names[0];
-       int rpc_pipe_bind_dbglvl = 0;
-
-       status = cli_rpc_pipe_open(cli, transport, table, &rpccli);
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       status = netlogon_creds_cli_lock(netlogon_creds, rpccli, &creds);
-       if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(0, ("netlogon_creds_cli_get returned %s\n",
-                         nt_errstr(status)));
-               TALLOC_FREE(rpccli);
-               return status;
-       }
-
-       auth_level = netlogon_creds_cli_auth_level(netlogon_creds);
-
-       status = rpccli_generic_bind_data(rpccli,
-                                         DCERPC_AUTH_TYPE_SCHANNEL,
-                                         auth_level,
-                                         NULL,
-                                         target_service,
-                                         domain,
-                                         creds->computer_name,
-                                         NULL,
-                                         CRED_AUTO_USE_KERBEROS,
-                                         creds,
-                                         &rpcauth);
-       if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(0, ("rpccli_generic_bind_data returned %s\n",
-                         nt_errstr(status)));
-               TALLOC_FREE(rpccli);
-               return status;
-       }
-
-       status = rpc_pipe_bind(rpccli, rpcauth);
-       if (NT_STATUS_EQUAL(status, NT_STATUS_NETWORK_ACCESS_DENIED)) {
-               rpc_pipe_bind_dbglvl = 1;
-               netlogon_creds_cli_delete(netlogon_creds, &creds);
-       }
-       if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(rpc_pipe_bind_dbglvl,
-                     ("cli_rpc_pipe_open_schannel_with_key: "
-                      "rpc_pipe_bind failed with error %s\n",
-                      nt_errstr(status)));
-               TALLOC_FREE(rpccli);
-               return status;
-       }
-
-       TALLOC_FREE(creds);
-
-       if (!ndr_syntax_id_equal(&table->syntax_id, &ndr_table_netlogon.syntax_id)) {
-               goto done;
-       }
-
-       status = netlogon_creds_cli_check(netlogon_creds,
-                                         rpccli->binding_handle);
-       if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(0, ("netlogon_creds_cli_check failed with %s\n",
-                         nt_errstr(status)));
-               TALLOC_FREE(rpccli);
-               return status;
-       }
-
-
-done:
-       DEBUG(10,("cli_rpc_pipe_open_schannel_with_key: opened pipe %s to machine %s "
-                 "for domain %s and bound using schannel.\n",
-                 table->name,
-                 rpccli->desthost, domain));
-
-       *_rpccli = rpccli;
-       return NT_STATUS_OK;
-}
-
 NTSTATUS cli_rpc_pipe_open_schannel_with_creds(struct cli_state *cli,
                                               const struct ndr_interface_table *table,
                                               enum dcerpc_transport_t transport,
index 01edaa4dcf26706eea7279272d4cad4b847e96ce..2290d62b49d864fb711798bcfd968b3d6c8ed8dc 100644 (file)
@@ -99,13 +99,6 @@ NTSTATUS cli_rpc_pipe_open_generic_auth(struct cli_state *cli,
                                        const char *password,
                                        struct rpc_pipe_client **presult);
 
-NTSTATUS cli_rpc_pipe_open_schannel_with_key(struct cli_state *cli,
-                                            const struct ndr_interface_table *table,
-                                            enum dcerpc_transport_t transport,
-                                            const char *domain,
-                                            struct netlogon_creds_cli_context *netlogon_creds,
-                                            struct rpc_pipe_client **presult);
-
 NTSTATUS cli_rpc_pipe_open_schannel_with_creds(struct cli_state *cli,
                                               const struct ndr_interface_table *table,
                                               enum dcerpc_transport_t transport,