From: Volker Lendecke Date: Tue, 3 Aug 2021 07:37:12 +0000 (+0200) Subject: torture: Remove rpc_open_tcp test program X-Git-Tag: ldb-2.5.0~853 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19482ebb7480ce10bce33c5c6c683c8bab8b8b35;p=thirdparty%2Fsamba.git torture: Remove rpc_open_tcp test program Its initial commit in 2008 stated that it still needs to be integrated into the test suite. As far as I can see, this never happened. Why remove it? Without this we can make rpc_open_tcp() static for easier refactoring. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/torture/rpc_open_tcp.c b/source3/torture/rpc_open_tcp.c deleted file mode 100644 index cd27b5ff208..00000000000 --- a/source3/torture/rpc_open_tcp.c +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Unix SMB/CIFS implementation. - * test program for rpc_pipe_open_tcp(). - * - * Copyright (C) Michael Adam 2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see . - */ - -#include "includes.h" -#include "rpc_client/cli_pipe.h" -#include "librpc/gen_ndr/ndr_dfs.h" -#include "librpc/gen_ndr/ndr_drsuapi.h" -#include "librpc/gen_ndr/ndr_dssetup.h" -#include "librpc/gen_ndr/ndr_echo.h" -#include "librpc/gen_ndr/ndr_epmapper.h" -#include "librpc/gen_ndr/ndr_eventlog.h" -#include "librpc/gen_ndr/ndr_initshutdown.h" -#include "librpc/gen_ndr/ndr_lsa.h" -#include "librpc/gen_ndr/ndr_netlogon.h" -#include "librpc/gen_ndr/ndr_ntsvcs.h" -#include "librpc/gen_ndr/ndr_samr.h" -#include "librpc/gen_ndr/ndr_srvsvc.h" -#include "librpc/gen_ndr/ndr_svcctl.h" -#include "librpc/gen_ndr/ndr_winreg.h" -#include "librpc/gen_ndr/ndr_wkssvc.h" - -extern const struct ndr_interface_table ndr_table_netdfs; -extern const struct ndr_interface_table ndr_table_drsuapi; -extern const struct ndr_interface_table ndr_table_dssetup; -extern const struct ndr_interface_table ndr_table_rpcecho; -extern const struct ndr_interface_table ndr_table_epmapper; -extern const struct ndr_interface_table ndr_table_eventlog; -extern const struct ndr_interface_table ndr_table_initshutdown; -extern const struct ndr_interface_table ndr_table_lsarpc; -extern const struct ndr_interface_table ndr_table_netlogon; -extern const struct ndr_interface_table ndr_table_ntsvcs; -extern const struct ndr_interface_table ndr_table_samr; -extern const struct ndr_interface_table ndr_table_srvsvc; -extern const struct ndr_interface_table ndr_table_svcctl; -extern const struct ndr_interface_table ndr_table_winreg; -extern const struct ndr_interface_table ndr_table_wkssvc; - -const struct ndr_interface_table *tables[] = { - &ndr_table_netdfs, - &ndr_table_drsuapi, - &ndr_table_dssetup, - &ndr_table_rpcecho, - &ndr_table_epmapper, - &ndr_table_eventlog, - &ndr_table_initshutdown, - &ndr_table_lsarpc, - &ndr_table_netlogon, - &ndr_table_ntsvcs, - &ndr_table_samr, - &ndr_table_srvsvc, - &ndr_table_svcctl, - &ndr_table_winreg, - &ndr_table_wkssvc, - NULL -}; - -int main(int argc, const char **argv) -{ - const struct ndr_interface_table **table; - NTSTATUS status; - struct rpc_pipe_client *rpc_pipe = NULL; - TALLOC_CTX *mem_ctx = talloc_stackframe(); - - if (argc != 3) { - d_printf("USAGE: %s interface host\n", argv[0]); - return -1; - } - - for (table = tables; *table != NULL; table++) { - if (strequal((*table)->name, argv[1])) { - break; - } - } - - if (*table == NULL) { - d_printf("ERROR: unknown interface '%s' given\n", argv[1]); - return -1; - } - - status = rpc_pipe_open_tcp(mem_ctx, argv[2], NULL, - *table, - &rpc_pipe); - if (!NT_STATUS_IS_OK(status)) { - d_printf("ERROR calling rpc_pipe_open_tcp(): %s\n", - nt_errstr(status)); - return -1; - } - - TALLOC_FREE(mem_ctx); - - return 0; -} - diff --git a/source3/torture/wscript_build b/source3/torture/wscript_build index bde70d6a800..0c4275de795 100644 --- a/source3/torture/wscript_build +++ b/source3/torture/wscript_build @@ -125,12 +125,3 @@ bld.SAMBA3_BINARY('vfstest', SMBREADLINE ''', for_selftest=True) - -bld.SAMBA3_BINARY('rpc_open_tcp', - source='rpc_open_tcp.c', - deps=''' - talloc - msrpc3 - ''', - for_selftest=True) -