summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/alter_context.c3
-rw-r--r--source4/torture/rpc/atsvc.c1
-rw-r--r--source4/torture/rpc/autoidl.c1
-rw-r--r--source4/torture/rpc/bench.c1
-rw-r--r--source4/torture/rpc/bind.c1
-rw-r--r--source4/torture/rpc/countcalls.c1
-rw-r--r--source4/torture/rpc/dcom.c1
-rw-r--r--source4/torture/rpc/dfs.c1
-rw-r--r--source4/torture/rpc/drsuapi.c4
-rw-r--r--source4/torture/rpc/drsuapi.h1
-rw-r--r--source4/torture/rpc/drsuapi_cracknames.c4
-rw-r--r--source4/torture/rpc/dssetup.c1
-rw-r--r--source4/torture/rpc/dssync.c1
-rw-r--r--source4/torture/rpc/echo.c1
-rw-r--r--source4/torture/rpc/epmapper.c1
-rw-r--r--source4/torture/rpc/eventlog.c1
-rw-r--r--source4/torture/rpc/initshutdown.c1
-rw-r--r--source4/torture/rpc/join.c2
-rw-r--r--source4/torture/rpc/lsa.c4
-rw-r--r--source4/torture/rpc/lsa_lookup.c2
-rw-r--r--source4/torture/rpc/mgmt.c1
-rw-r--r--source4/torture/rpc/netlogon.c4
-rw-r--r--source4/torture/rpc/oxidresolve.c1
-rw-r--r--source4/torture/rpc/remact.c1
-rw-r--r--source4/torture/rpc/rot.c1
-rw-r--r--source4/torture/rpc/rpc.c125
-rw-r--r--source4/torture/rpc/rpc.h30
-rw-r--r--source4/torture/rpc/samlogon.c4
-rw-r--r--source4/torture/rpc/samr.c4
-rw-r--r--source4/torture/rpc/samsync.c4
-rw-r--r--source4/torture/rpc/scanner.c1
-rw-r--r--source4/torture/rpc/schannel.c4
-rw-r--r--source4/torture/rpc/session_key.c5
-rw-r--r--source4/torture/rpc/spoolss.c1
-rw-r--r--source4/torture/rpc/srvsvc.c1
-rw-r--r--source4/torture/rpc/svcctl.c1
-rw-r--r--source4/torture/rpc/testjoin.c5
-rw-r--r--source4/torture/rpc/unixinfo.c1
-rw-r--r--source4/torture/rpc/winreg.c1
-rw-r--r--source4/torture/rpc/wkssvc.c1
40 files changed, 202 insertions, 27 deletions
diff --git a/source4/torture/rpc/alter_context.c b/source4/torture/rpc/alter_context.c
index b76cf605b2..62cfcf758d 100644
--- a/source4/torture/rpc/alter_context.c
+++ b/source4/torture/rpc/alter_context.c
@@ -24,8 +24,7 @@
#include "torture/torture.h"
#include "librpc/gen_ndr/ndr_lsa.h"
#include "librpc/gen_ndr/ndr_dssetup.h"
-#include "auth/credentials/credentials.h"
-#include "torture/rpc/proto.h"
+#include "torture/rpc/rpc.h"
BOOL torture_rpc_alter_context(void)
{
diff --git a/source4/torture/rpc/atsvc.c b/source4/torture/rpc/atsvc.c
index 7a282dd1be..bfc44a4bb1 100644
--- a/source4/torture/rpc/atsvc.c
+++ b/source4/torture/rpc/atsvc.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "torture/torture.h"
#include "librpc/gen_ndr/ndr_atsvc.h"
+#include "torture/rpc/rpc.h"
static BOOL test_JobGetInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint32_t job_id)
{
diff --git a/source4/torture/rpc/autoidl.c b/source4/torture/rpc/autoidl.c
index 32bee5c363..cc9d8a1641 100644
--- a/source4/torture/rpc/autoidl.c
+++ b/source4/torture/rpc/autoidl.c
@@ -25,6 +25,7 @@
#include "librpc/gen_ndr/ndr_drsuapi.h"
#include "librpc/gen_ndr/ndr_misc.h"
#include "librpc/rpc/dcerpc_table.h"
+#include "torture/rpc/rpc.h"
#if 1
diff --git a/source4/torture/rpc/bench.c b/source4/torture/rpc/bench.c
index b0605649c3..c4a0859725 100644
--- a/source4/torture/rpc/bench.c
+++ b/source4/torture/rpc/bench.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "torture/torture.h"
#include "librpc/gen_ndr/ndr_srvsvc.h"
+#include "torture/rpc/rpc.h"
/**************************/
/* srvsvc_NetShare */
diff --git a/source4/torture/rpc/bind.c b/source4/torture/rpc/bind.c
index a1fd3d65b2..2a6cb53979 100644
--- a/source4/torture/rpc/bind.c
+++ b/source4/torture/rpc/bind.c
@@ -25,6 +25,7 @@
#include "torture/torture.h"
#include "librpc/gen_ndr/ndr_lsa.h"
#include "lib/cmdline/popt_common.h"
+#include "torture/rpc/rpc.h"
/*
This test is 'bogus' in that it doesn't actually perform to the
diff --git a/source4/torture/rpc/countcalls.c b/source4/torture/rpc/countcalls.c
index 9da8e54a91..8ad5241ada 100644
--- a/source4/torture/rpc/countcalls.c
+++ b/source4/torture/rpc/countcalls.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "torture/torture.h"
#include "librpc/rpc/dcerpc_table.h"
+#include "torture/rpc/rpc.h"
BOOL torture_rpc_countcalls(void)
diff --git a/source4/torture/rpc/dcom.c b/source4/torture/rpc/dcom.c
index 71a7c8d0aa..b9ff5adffe 100644
--- a/source4/torture/rpc/dcom.c
+++ b/source4/torture/rpc/dcom.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "torture/torture.h"
+#include "torture/rpc/rpc.h"
#include "librpc/gen_ndr/ndr_oxidresolver.h"
BOOL torture_rpc_dcom(void)
diff --git a/source4/torture/rpc/dfs.c b/source4/torture/rpc/dfs.c
index 3e600a4f44..14261c4123 100644
--- a/source4/torture/rpc/dfs.c
+++ b/source4/torture/rpc/dfs.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "torture/torture.h"
+#include "torture/rpc/rpc.h"
#include "librpc/gen_ndr/ndr_dfs.h"
diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c
index f23bb5586b..0b700a7ac4 100644
--- a/source4/torture/rpc/drsuapi.c
+++ b/source4/torture/rpc/drsuapi.c
@@ -25,9 +25,7 @@
#include "includes.h"
#include "torture/torture.h"
#include "librpc/gen_ndr/ndr_drsuapi.h"
-#include "auth/credentials/credentials.h"
-#include "torture/rpc/drsuapi.h"
-#include "torture/rpc/proto.h"
+#include "torture/rpc/rpc.h"
BOOL test_DsBind(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
struct DsPrivate *priv)
diff --git a/source4/torture/rpc/drsuapi.h b/source4/torture/rpc/drsuapi.h
index 25bbc7ebed..4914d0a272 100644
--- a/source4/torture/rpc/drsuapi.h
+++ b/source4/torture/rpc/drsuapi.h
@@ -22,6 +22,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "librpc/gen_ndr/drsuapi.h"
struct DsPrivate {
struct policy_handle bind_handle;
diff --git a/source4/torture/rpc/drsuapi_cracknames.c b/source4/torture/rpc/drsuapi_cracknames.c
index 0a44084dde..ef8a5cc45d 100644
--- a/source4/torture/rpc/drsuapi_cracknames.c
+++ b/source4/torture/rpc/drsuapi_cracknames.c
@@ -25,9 +25,7 @@
#include "includes.h"
#include "torture/torture.h"
#include "librpc/gen_ndr/ndr_drsuapi.h"
-#include "auth/credentials/credentials.h"
-#include "torture/rpc/drsuapi.h"
-#include "torture/rpc/proto.h"
+#include "torture/rpc/rpc.h"
#include "ldb/include/ldb.h"
static BOOL test_DsCrackNamesMatrix(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
diff --git a/source4/torture/rpc/dssetup.c b/source4/torture/rpc/dssetup.c
index ea5925db0c..70f8c99dde 100644
--- a/source4/torture/rpc/dssetup.c
+++ b/source4/torture/rpc/dssetup.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "torture/torture.h"
#include "librpc/gen_ndr/ndr_dssetup.h"
+#include "torture/rpc/rpc.h"
BOOL test_DsRoleGetPrimaryDomainInformation(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c
index 3731f19c61..d334f162bc 100644
--- a/source4/torture/rpc/dssync.c
+++ b/source4/torture/rpc/dssync.c
@@ -25,6 +25,7 @@
#include "lib/cmdline/popt_common.h"
#include "librpc/gen_ndr/ndr_drsuapi.h"
#include "libcli/cldap/cldap.h"
+#include "libcli/ldap/ldap_client.h"
#include "torture/ldap/proto.h"
struct DsSyncBindInfo {
diff --git a/source4/torture/rpc/echo.c b/source4/torture/rpc/echo.c
index 02631d0b44..49752665e4 100644
--- a/source4/torture/rpc/echo.c
+++ b/source4/torture/rpc/echo.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "torture/torture.h"
+#include "torture/rpc/rpc.h"
#include "lib/events/events.h"
#include "librpc/gen_ndr/ndr_echo.h"
diff --git a/source4/torture/rpc/epmapper.c b/source4/torture/rpc/epmapper.c
index bf5747eb93..4f6cb122a8 100644
--- a/source4/torture/rpc/epmapper.c
+++ b/source4/torture/rpc/epmapper.c
@@ -23,6 +23,7 @@
#include "torture/torture.h"
#include "librpc/gen_ndr/ndr_epmapper.h"
#include "librpc/rpc/dcerpc_table.h"
+#include "torture/rpc/rpc.h"
/*
diff --git a/source4/torture/rpc/eventlog.c b/source4/torture/rpc/eventlog.c
index 64c2b0b4ad..8de099d215 100644
--- a/source4/torture/rpc/eventlog.c
+++ b/source4/torture/rpc/eventlog.c
@@ -24,6 +24,7 @@
#include "torture/torture.h"
#include "librpc/gen_ndr/ndr_eventlog.h"
#include "librpc/gen_ndr/ndr_lsa.h"
+#include "torture/rpc/rpc.h"
static void init_lsa_String(struct lsa_String *name, const char *s)
{
diff --git a/source4/torture/rpc/initshutdown.c b/source4/torture/rpc/initshutdown.c
index 4b754acf74..efd320052d 100644
--- a/source4/torture/rpc/initshutdown.c
+++ b/source4/torture/rpc/initshutdown.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "torture/torture.h"
#include "librpc/gen_ndr/ndr_initshutdown.h"
+#include "torture/rpc/rpc.h"
static void init_initshutdown_String(TALLOC_CTX *mem_ctx, struct initshutdown_String *name, const char *s)
{
diff --git a/source4/torture/rpc/join.c b/source4/torture/rpc/join.c
index 7dea5cdb26..2a3c26087f 100644
--- a/source4/torture/rpc/join.c
+++ b/source4/torture/rpc/join.c
@@ -2,7 +2,7 @@
#include "libnet/libnet.h"
#include "auth/credentials/credentials.h"
-#include "torture/rpc/proto.h"
+#include "torture/rpc/rpc.h"
#define TORTURE_NETBIOS_NAME "smbtorturejoin"
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index eaced4b3d3..980c9b36e6 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -25,8 +25,8 @@
#include "librpc/gen_ndr/ndr_lsa.h"
#include "lib/events/events.h"
#include "libcli/security/proto.h"
-#include "auth/credentials/credentials.h"
-#include "libcli/auth/proto.h"
+#include "libcli/auth/libcli_auth.h"
+#include "torture/rpc/rpc.h"
static void init_lsa_String(struct lsa_String *name, const char *s)
{
diff --git a/source4/torture/rpc/lsa_lookup.c b/source4/torture/rpc/lsa_lookup.c
index aa36c63f29..c009f89f58 100644
--- a/source4/torture/rpc/lsa_lookup.c
+++ b/source4/torture/rpc/lsa_lookup.c
@@ -24,6 +24,8 @@
#include "librpc/gen_ndr/ndr_lsa.h"
#include "lib/events/events.h"
#include "libcli/security/proto.h"
+#include "libnet/libnet_join.h"
+#include "torture/rpc/rpc.h"
static BOOL open_policy(TALLOC_CTX *mem_ctx, struct dcerpc_pipe *p,
struct policy_handle **handle)
diff --git a/source4/torture/rpc/mgmt.c b/source4/torture/rpc/mgmt.c
index 5e6f0e366e..d94c65e1d9 100644
--- a/source4/torture/rpc/mgmt.c
+++ b/source4/torture/rpc/mgmt.c
@@ -24,6 +24,7 @@
#include "librpc/gen_ndr/ndr_mgmt.h"
#include "auth/gensec/gensec.h"
#include "librpc/rpc/dcerpc_table.h"
+#include "torture/rpc/rpc.h"
/*
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index e786dd3898..a64df0f5bb 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -28,8 +28,8 @@
#include "auth/auth.h"
#include "smb.h"
#include "lib/cmdline/popt_common.h"
-#include "torture/rpc/proto.h"
-#include "libcli/auth/proto.h"
+#include "torture/rpc/rpc.h"
+#include "libcli/auth/libcli_auth.h"
static const char *machine_password;
diff --git a/source4/torture/rpc/oxidresolve.c b/source4/torture/rpc/oxidresolve.c
index 837d64cc52..e3070fa6ee 100644
--- a/source4/torture/rpc/oxidresolve.c
+++ b/source4/torture/rpc/oxidresolve.c
@@ -24,6 +24,7 @@
#include "librpc/gen_ndr/ndr_oxidresolver.h"
#include "librpc/gen_ndr/ndr_remact.h"
#include "librpc/gen_ndr/ndr_epmapper.h"
+#include "torture/rpc/rpc.h"
#define CLSID_IMAGEDOC "02B01C80-E03D-101A-B294-00DD010F2BF9"
diff --git a/source4/torture/rpc/remact.c b/source4/torture/rpc/remact.c
index 62d1d2e0d6..69c31fc642 100644
--- a/source4/torture/rpc/remact.c
+++ b/source4/torture/rpc/remact.c
@@ -23,6 +23,7 @@
#include "torture/torture.h"
#include "librpc/gen_ndr/ndr_remact.h"
#include "librpc/gen_ndr/ndr_epmapper.h"
+#include "torture/rpc/rpc.h"
#define CLSID_IMAGEDOC "02B01C80-E03D-101A-B294-00DD010F2BF9"
diff --git a/source4/torture/rpc/rot.c b/source4/torture/rpc/rot.c
index ccddab086e..48a8717fa5 100644
--- a/source4/torture/rpc/rot.c
+++ b/source4/torture/rpc/rot.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "torture/torture.h"
#include "librpc/gen_ndr/ndr_rot.h"
+#include "torture/rpc/rpc.h"
BOOL torture_rpc_rot(void)
{
diff --git a/source4/torture/rpc/rpc.c b/source4/torture/rpc/rpc.c
new file mode 100644
index 0000000000..4fe35a5cf7
--- /dev/null
+++ b/source4/torture/rpc/rpc.c
@@ -0,0 +1,125 @@
+/*
+ Unix SMB/CIFS implementation.
+ SMB torture tester
+ Copyright (C) Andrew Tridgell 1997-2003
+ Copyright (C) Jelmer Vernooij 2006
+
+ 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 2 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, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "includes.h"
+#include "auth/credentials/credentials.h"
+#include "lib/cmdline/popt_common.h"
+#include "torture/rpc/rpc.h"
+#include "torture/torture.h"
+
+/* open a rpc connection to the chosen binding string */
+NTSTATUS torture_rpc_connection(TALLOC_CTX *parent_ctx,
+ struct dcerpc_pipe **p,
+ const struct dcerpc_interface_table *table)
+{
+ NTSTATUS status;
+ const char *binding = lp_parm_string(-1, "torture", "binding");
+
+ if (!binding) {
+ printf("You must specify a ncacn binding string\n");
+ return NT_STATUS_INVALID_PARAMETER;
+ }
+
+ status = dcerpc_pipe_connect(parent_ctx,
+ p, binding, table,
+ cmdline_credentials, NULL);
+
+ return status;
+}
+
+/* open a rpc connection to a specific transport */
+NTSTATUS torture_rpc_connection_transport(TALLOC_CTX *parent_ctx,
+ struct dcerpc_pipe **p,
+ const struct dcerpc_interface_table *table,
+ enum dcerpc_transport_t transport)
+{
+ NTSTATUS status;
+ const char *binding = lp_parm_string(-1, "torture", "binding");
+ struct dcerpc_binding *b;
+ TALLOC_CTX *mem_ctx = talloc_named(parent_ctx, 0, "torture_rpc_connection_smb");
+
+ if (!binding) {
+ printf("You must specify a ncacn binding string\n");
+ talloc_free(mem_ctx);
+ return NT_STATUS_INVALID_PARAMETER;
+ }
+
+ status = dcerpc_parse_binding(mem_ctx, binding, &b);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0,("Failed to parse dcerpc binding '%s'\n", binding));
+ talloc_free(mem_ctx);
+ return status;
+ }
+
+ b->transport = transport;
+
+ status = dcerpc_pipe_connect_b(mem_ctx, p, b, table,
+ cmdline_credentials, NULL);
+
+ if (NT_STATUS_IS_OK(status)) {
+ *p = talloc_reference(parent_ctx, *p);
+ } else {
+ *p = NULL;
+ }
+ talloc_free(mem_ctx);
+ return status;
+}
+
+NTSTATUS torture_rpc_init(void)
+{
+ register_torture_op("RPC-LSA", torture_rpc_lsa, 0);
+ register_torture_op("RPC-LSALOOKUP", torture_rpc_lsa_lookup, 0);
+ register_torture_op("RPC-SECRETS", torture_rpc_lsa_secrets, 0);
+ register_torture_op("RPC-ECHO", torture_rpc_echo, 0);
+ register_torture_op("RPC-DFS", torture_rpc_dfs, 0);
+ register_torture_op("RPC-SPOOLSS", torture_rpc_spoolss, 0);
+ register_torture_op("RPC-SAMR", torture_rpc_samr, 0);
+ register_torture_op("RPC-UNIXINFO", torture_rpc_unixinfo, 0);
+ register_torture_op("RPC-NETLOGON", torture_rpc_netlogon, 0);
+ register_torture_op("RPC-SAMLOGON", torture_rpc_samlogon, 0);
+ register_torture_op("RPC-SAMSYNC", torture_rpc_samsync, 0);
+ register_torture_op("RPC-SCHANNEL", torture_rpc_schannel, 0);
+ register_torture_op("RPC-WKSSVC", torture_rpc_wkssvc, 0);
+ register_torture_op("RPC-SRVSVC", torture_rpc_srvsvc, 0);
+ register_torture_op("RPC-SVCCTL", torture_rpc_svcctl, 0);
+ register_torture_op("RPC-ATSVC", torture_rpc_atsvc, 0);
+ register_torture_op("RPC-EVENTLOG", torture_rpc_eventlog, 0);
+ register_torture_op("RPC-EPMAPPER", torture_rpc_epmapper, 0);
+ register_torture_op("RPC-WINREG", torture_rpc_winreg, 0);
+ register_torture_op("RPC-INITSHUTDOWN", torture_rpc_initshutdown, 0);
+ register_torture_op("RPC-OXIDRESOLVE", torture_rpc_oxidresolve, 0);
+ register_torture_op("RPC-REMACT", torture_rpc_remact, 0);
+ register_torture_op("RPC-MGMT", torture_rpc_mgmt, 0);
+ register_torture_op("RPC-SCANNER", torture_rpc_scanner, 0);
+ register_torture_op("RPC-AUTOIDL", torture_rpc_autoidl, 0);
+ register_torture_op("RPC-COUNTCALLS", torture_rpc_countcalls, 0);
+ register_torture_op("RPC-MULTIBIND", torture_multi_bind, 0);
+ register_torture_op("RPC-DRSUAPI", torture_rpc_drsuapi, 0);
+ register_torture_op("RPC-CRACKNAMES", torture_rpc_drsuapi_cracknames, 0);
+ register_torture_op("RPC-ROT", torture_rpc_rot, 0);
+ register_torture_op("RPC-DSSETUP", torture_rpc_dssetup, 0);
+ register_torture_op("RPC-ALTERCONTEXT", torture_rpc_alter_context, 0);
+ register_torture_op("RPC-JOIN", torture_rpc_join, 0);
+ register_torture_op("RPC-DSSYNC", torture_rpc_dssync, 0);
+ register_torture_op("BENCH-RPC", torture_bench_rpc, 0);
+
+ return NT_STATUS_OK;
+}
diff --git a/source4/torture/rpc/rpc.h b/source4/torture/rpc/rpc.h
new file mode 100644
index 0000000000..e851287218
--- /dev/null
+++ b/source4/torture/rpc/rpc.h
@@ -0,0 +1,30 @@
+/*
+ Unix SMB/CIFS implementation.
+ SMB torture tester
+ Copyright (C) Andrew Tridgell 1997-2003
+ Copyright (C) Jelmer Vernooij 2006
+
+ 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 2 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, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#ifndef __TORTURE_RPC_H__
+#define __TORTURE_RPC_H__
+
+#include "auth/credentials/credentials.h"
+#include "torture/rpc/drsuapi.h"
+#include "libnet/libnet_join.h"
+#include "torture/rpc/proto.h"
+
+#endif /* __TORTURE_RPC_H__ */
diff --git a/source4/torture/rpc/samlogon.c b/source4/torture/rpc/samlogon.c
index 9965e5ddbd..ecca8418b8 100644
--- a/source4/torture/rpc/samlogon.c
+++ b/source4/torture/rpc/samlogon.c
@@ -27,9 +27,9 @@
#include "auth/auth.h"
#include "lib/crypto/crypto.h"
#include "lib/cmdline/popt_common.h"
-#include "torture/rpc/proto.h"
+#include "torture/rpc/rpc.h"
#include "auth/gensec/schannel_proto.h"
-#include "libcli/auth/proto.h"
+#include "libcli/auth/libcli_auth.h"
#define TEST_MACHINE_NAME "samlogontest"
#define TEST_USER_NAME "samlogontestuser"
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index f5bbed1805..e518a0782e 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -26,9 +26,9 @@
#include "librpc/gen_ndr/ndr_samr.h"
#include "smb.h"
#include "lib/crypto/crypto.h"
-#include "auth/credentials/credentials.h"
-#include "libcli/auth/proto.h"
+#include "libcli/auth/libcli_auth.h"
#include "libcli/security/proto.h"
+#include "torture/rpc/rpc.h"
#define TEST_ACCOUNT_NAME "samrtorturetest"
#define TEST_ALIASNAME "samrtorturetestalias"
diff --git a/source4/torture/rpc/samsync.c b/source4/torture/rpc/samsync.c
index 6155b7ac1e..75a90b8b55 100644
--- a/source4/torture/rpc/samsync.c
+++ b/source4/torture/rpc/samsync.c
@@ -28,9 +28,9 @@
#include "dlinklist.h"
#include "lib/crypto/crypto.h"
#include "system/time.h"
-#include "torture/rpc/proto.h"
+#include "torture/rpc/rpc.h"
#include "auth/gensec/schannel_proto.h"
-#include "libcli/auth/proto.h"
+#include "libcli/auth/libcli_auth.h"
#include "libcli/security/proto.h"
#define TEST_MACHINE_NAME "samsynctest"
diff --git a/source4/torture/rpc/scanner.c b/source4/torture/rpc/scanner.c
index 7016043807..d714fe5427 100644
--- a/source4/torture/rpc/scanner.c
+++ b/source4/torture/rpc/scanner.c
@@ -24,6 +24,7 @@
#include "torture/torture.h"
#include "librpc/gen_ndr/ndr_mgmt.h"
#include "librpc/rpc/dcerpc_table.h"
+#include "torture/rpc/rpc.h"
/*
work out how many calls there are for an interface
diff --git a/source4/torture/rpc/schannel.c b/source4/torture/rpc/schannel.c
index 41ad88d109..f48e4c2a08 100644
--- a/source4/torture/rpc/schannel.c
+++ b/source4/torture/rpc/schannel.c
@@ -23,10 +23,10 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_netlogon.h"
#include "auth/credentials/credentials.h"
-#include "torture/rpc/proto.h"
+#include "torture/rpc/rpc.h"
#include "lib/cmdline/popt_common.h"
#include "auth/gensec/schannel_proto.h"
-#include "libcli/auth/proto.h"
+#include "libcli/auth/libcli_auth.h"
#include "libcli/security/proto.h"
#define TEST_MACHINE_NAME "schannel"
diff --git a/source4/torture/rpc/session_key.c b/source4/torture/rpc/session_key.c
index 448c85c202..9656eda054 100644
--- a/source4/torture/rpc/session_key.c
+++ b/source4/torture/rpc/session_key.c
@@ -24,9 +24,8 @@
#include "torture/torture.h"
#include "librpc/gen_ndr/ndr_lsa.h"
-#include "auth/credentials/credentials.h"
-#include "torture/rpc/proto.h"
-#include "libcli/auth/proto.h"
+#include "libcli/auth/libcli_auth.h"
+#include "torture/rpc/rpc.h"
static void init_lsa_String(struct lsa_String *name, const char *s)
{
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index fa2b7df418..9cc438d9b8 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "torture/torture.h"
+#include "torture/rpc/rpc.h"
#include "librpc/gen_ndr/ndr_spoolss.h"
struct test_spoolss_context {
diff --git a/source4/torture/rpc/srvsvc.c b/source4/torture/rpc/srvsvc.c
index 2e4f158070..e5e9221760 100644
--- a/source4/torture/rpc/srvsvc.c
+++ b/source4/torture/rpc/srvsvc.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "torture/torture.h"
#include "librpc/gen_ndr/ndr_srvsvc.h"
+#include "torture/rpc/rpc.h"
/**************************/
/* srvsvc_NetCharDev */
diff --git a/source4/torture/rpc/svcctl.c b/source4/torture/rpc/svcctl.c
index 5f1514419e..dddfea961b 100644
--- a/source4/torture/rpc/svcctl.c
+++ b/source4/torture/rpc/svcctl.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "torture/torture.h"
#include "librpc/gen_ndr/ndr_svcctl.h"
+#include "torture/rpc/rpc.h"
static BOOL test_EnumServicesStatus(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct policy_handle *h)
{
diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c
index 02b6366b1e..4df25d2aea 100644
--- a/source4/torture/rpc/testjoin.c
+++ b/source4/torture/rpc/testjoin.c
@@ -34,10 +34,9 @@
#include "smb.h"
#include "lib/ldb/include/ldb.h"
-#include "auth/credentials/credentials.h"
-#include "torture/rpc/proto.h"
+#include "libcli/auth/libcli_auth.h"
+#include "torture/rpc/rpc.h"
#include "libcli/security/proto.h"
-#include "libcli/auth/proto.h"
struct test_join {
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/unixinfo.c b/source4/torture/rpc/unixinfo.c
index 836e5060df..946d5e1803 100644
--- a/source4/torture/rpc/unixinfo.c
+++ b/source4/torture/rpc/unixinfo.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "torture/torture.h"
+#include "torture/rpc/rpc.h"
#include "librpc/gen_ndr/ndr_unixinfo.h"
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index 293cba0ee1..88d50f73d7 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -24,6 +24,7 @@
#include "torture/torture.h"
#include "librpc/gen_ndr/ndr_winreg.h"
#include "libcli/security/proto.h"
+#include "torture/rpc/rpc.h"
#define TEST_KEY_BASE "smbtorture test"
#define TEST_KEY1 TEST_KEY_BASE "\\spottyfoot"
diff --git a/source4/torture/rpc/wkssvc.c b/source4/torture/rpc/wkssvc.c
index 6adda319bb..01e81a8de7 100644
--- a/source4/torture/rpc/wkssvc.c
+++ b/source4/torture/rpc/wkssvc.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "torture/torture.h"
#include "librpc/gen_ndr/ndr_wkssvc.h"
+#include "torture/rpc/rpc.h"
static BOOL test_NetWkstaGetInfo(struct dcerpc_pipe *p,