mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
r14379: Build torture/rpc/ as a seperate smbtorture module. Move helper
functions for rpc out of torture/torture.c
This commit is contained in:
parent
bb6d0be0aa
commit
1d2d970f3b
@ -19,10 +19,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "torture/torture.h"
|
|
||||||
#include "dlinklist.h"
|
#include "dlinklist.h"
|
||||||
#include "libcli/raw/libcliraw.h"
|
#include "libcli/raw/libcliraw.h"
|
||||||
#include "libcli/libcli.h"
|
#include "torture/torture.h"
|
||||||
|
|
||||||
int create_complex_file(struct smbcli_state *cli, TALLOC_CTX *mem_ctx, const char *fname);
|
int create_complex_file(struct smbcli_state *cli, TALLOC_CTX *mem_ctx, const char *fname);
|
||||||
|
|
||||||
|
@ -22,9 +22,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "torture/torture.h"
|
|
||||||
#include "libcli/raw/libcliraw.h"
|
#include "libcli/raw/libcliraw.h"
|
||||||
#include "libcli/libcli.h"
|
#include "libcli/libcli.h"
|
||||||
|
#include "torture/torture.h"
|
||||||
#include "system/time.h"
|
#include "system/time.h"
|
||||||
#include "system/filesys.h"
|
#include "system/filesys.h"
|
||||||
|
|
||||||
|
@ -73,9 +73,9 @@ OBJ_FILES = \
|
|||||||
REQUIRED_SUBSYSTEMS = \
|
REQUIRED_SUBSYSTEMS = \
|
||||||
com dcom
|
com dcom
|
||||||
|
|
||||||
#################################
|
[MODULE::torture_rpc]
|
||||||
# Start SUBSYSTEM TORTURE_RPC
|
SUBSYSTEM = smbtorture
|
||||||
[SUBSYSTEM::TORTURE_RPC]
|
INIT_FUNCTION = torture_rpc_init
|
||||||
PRIVATE_PROTO_HEADER = \
|
PRIVATE_PROTO_HEADER = \
|
||||||
rpc/proto.h
|
rpc/proto.h
|
||||||
OBJ_FILES = \
|
OBJ_FILES = \
|
||||||
@ -115,7 +115,8 @@ OBJ_FILES = \
|
|||||||
rpc/bind.o \
|
rpc/bind.o \
|
||||||
rpc/dssetup.o \
|
rpc/dssetup.o \
|
||||||
rpc/alter_context.o \
|
rpc/alter_context.o \
|
||||||
rpc/bench.o
|
rpc/bench.o \
|
||||||
|
rpc/rpc.o
|
||||||
REQUIRED_SUBSYSTEMS = \
|
REQUIRED_SUBSYSTEMS = \
|
||||||
NDR_TABLE RPC_NDR_UNIXINFO RPC_NDR_SAMR RPC_NDR_WINREG RPC_NDR_INITSHUTDOWN \
|
NDR_TABLE RPC_NDR_UNIXINFO RPC_NDR_SAMR RPC_NDR_WINREG RPC_NDR_INITSHUTDOWN \
|
||||||
RPC_NDR_OXIDRESOLVER RPC_NDR_EVENTLOG RPC_NDR_ECHO RPC_NDR_SVCCTL \
|
RPC_NDR_OXIDRESOLVER RPC_NDR_EVENTLOG RPC_NDR_ECHO RPC_NDR_SVCCTL \
|
||||||
@ -123,8 +124,6 @@ REQUIRED_SUBSYSTEMS = \
|
|||||||
RPC_NDR_LSA RPC_NDR_EPMAPPER RPC_NDR_DFS RPC_NDR_SPOOLSS \
|
RPC_NDR_LSA RPC_NDR_EPMAPPER RPC_NDR_DFS RPC_NDR_SPOOLSS \
|
||||||
RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_ROT RPC_NDR_DSSETUP \
|
RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_ROT RPC_NDR_DSSETUP \
|
||||||
RPC_NDR_REMACT RPC_NDR_OXIDRESOLVER WB_HELPER
|
RPC_NDR_REMACT RPC_NDR_OXIDRESOLVER WB_HELPER
|
||||||
# End SUBSYSTEM TORTURE_RPC
|
|
||||||
#################################
|
|
||||||
|
|
||||||
#################################
|
#################################
|
||||||
# Start SUBSYSTEM TORTURE_RAP
|
# Start SUBSYSTEM TORTURE_RAP
|
||||||
@ -219,7 +218,7 @@ REQUIRED_SUBSYSTEMS = \
|
|||||||
# Start BINARY smbtorture
|
# Start BINARY smbtorture
|
||||||
[BINARY::smbtorture]
|
[BINARY::smbtorture]
|
||||||
INSTALLDIR = BINDIR
|
INSTALLDIR = BINDIR
|
||||||
PRIVATE_PROTO_HEADER = torture.h
|
PRIVATE_PROTO_HEADER = proto.h
|
||||||
OBJ_FILES = \
|
OBJ_FILES = \
|
||||||
torture.o \
|
torture.o \
|
||||||
torture_util.o
|
torture_util.o
|
||||||
@ -227,7 +226,6 @@ REQUIRED_SUBSYSTEMS = \
|
|||||||
TORTURE_BASIC \
|
TORTURE_BASIC \
|
||||||
TORTURE_RAW \
|
TORTURE_RAW \
|
||||||
TORTURE_SMB2 \
|
TORTURE_SMB2 \
|
||||||
TORTURE_RPC \
|
|
||||||
TORTURE_RAP \
|
TORTURE_RAP \
|
||||||
TORTURE_AUTH \
|
TORTURE_AUTH \
|
||||||
TORTURE_LOCAL \
|
TORTURE_LOCAL \
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "torture/torture.h"
|
#include "torture/rpc/rpc.h"
|
||||||
#include "libnet/libnet.h"
|
#include "libnet/libnet.h"
|
||||||
|
|
||||||
static BOOL test_domainopen(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
|
static BOOL test_domainopen(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "torture/torture.h"
|
#include "torture/rpc/rpc.h"
|
||||||
#include "libnet/libnet.h"
|
#include "libnet/libnet.h"
|
||||||
#include "lib/cmdline/popt_common.h"
|
#include "lib/cmdline/popt_common.h"
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "torture/torture.h"
|
#include "torture/rpc/rpc.h"
|
||||||
#include "libnet/libnet.h"
|
#include "libnet/libnet.h"
|
||||||
#include "libnet/userinfo.h"
|
#include "libnet/userinfo.h"
|
||||||
#include "libcli/security/proto.h"
|
#include "libcli/security/proto.h"
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "torture/torture.h"
|
#include "torture/rpc/rpc.h"
|
||||||
#include "libnet/userman.h"
|
#include "libnet/userman.h"
|
||||||
#include "libnet/libnet.h"
|
#include "libnet/libnet.h"
|
||||||
|
|
||||||
|
@ -25,8 +25,7 @@
|
|||||||
#include "librpc/gen_ndr/ndr_samr.h"
|
#include "librpc/gen_ndr/ndr_samr.h"
|
||||||
#include "lib/socket/socket.h"
|
#include "lib/socket/socket.h"
|
||||||
#include "lib/events/events.h"
|
#include "lib/events/events.h"
|
||||||
#include "auth/credentials/credentials.h"
|
#include "torture/rpc/rpc.h"
|
||||||
#include "torture/rpc/proto.h"
|
|
||||||
#include "libcli/resolve/resolve.h"
|
#include "libcli/resolve/resolve.h"
|
||||||
#include "system/network.h"
|
#include "system/network.h"
|
||||||
#include "netif/netif.h"
|
#include "netif/netif.h"
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
#include "libcli/raw/libcliraw.h"
|
#include "libcli/raw/libcliraw.h"
|
||||||
#include "libcli/libcli.h"
|
#include "libcli/libcli.h"
|
||||||
|
#include "librpc/gen_ndr/lsa.h"
|
||||||
#include "libcli/util/clilsa.h"
|
#include "libcli/util/clilsa.h"
|
||||||
#include "libcli/security/proto.h"
|
#include "libcli/security/proto.h"
|
||||||
|
|
||||||
|
@ -24,8 +24,7 @@
|
|||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
#include "librpc/gen_ndr/ndr_lsa.h"
|
#include "librpc/gen_ndr/ndr_lsa.h"
|
||||||
#include "librpc/gen_ndr/ndr_dssetup.h"
|
#include "librpc/gen_ndr/ndr_dssetup.h"
|
||||||
#include "auth/credentials/credentials.h"
|
#include "torture/rpc/rpc.h"
|
||||||
#include "torture/rpc/proto.h"
|
|
||||||
|
|
||||||
BOOL torture_rpc_alter_context(void)
|
BOOL torture_rpc_alter_context(void)
|
||||||
{
|
{
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
#include "librpc/gen_ndr/ndr_atsvc.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)
|
static BOOL test_JobGetInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint32_t job_id)
|
||||||
{
|
{
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "librpc/gen_ndr/ndr_drsuapi.h"
|
#include "librpc/gen_ndr/ndr_drsuapi.h"
|
||||||
#include "librpc/gen_ndr/ndr_misc.h"
|
#include "librpc/gen_ndr/ndr_misc.h"
|
||||||
#include "librpc/rpc/dcerpc_table.h"
|
#include "librpc/rpc/dcerpc_table.h"
|
||||||
|
#include "torture/rpc/rpc.h"
|
||||||
|
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
#include "librpc/gen_ndr/ndr_srvsvc.h"
|
#include "librpc/gen_ndr/ndr_srvsvc.h"
|
||||||
|
#include "torture/rpc/rpc.h"
|
||||||
|
|
||||||
/**************************/
|
/**************************/
|
||||||
/* srvsvc_NetShare */
|
/* srvsvc_NetShare */
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
#include "librpc/gen_ndr/ndr_lsa.h"
|
#include "librpc/gen_ndr/ndr_lsa.h"
|
||||||
#include "lib/cmdline/popt_common.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
|
This test is 'bogus' in that it doesn't actually perform to the
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
#include "librpc/rpc/dcerpc_table.h"
|
#include "librpc/rpc/dcerpc_table.h"
|
||||||
|
#include "torture/rpc/rpc.h"
|
||||||
|
|
||||||
|
|
||||||
BOOL torture_rpc_countcalls(void)
|
BOOL torture_rpc_countcalls(void)
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
|
#include "torture/rpc/rpc.h"
|
||||||
#include "librpc/gen_ndr/ndr_oxidresolver.h"
|
#include "librpc/gen_ndr/ndr_oxidresolver.h"
|
||||||
|
|
||||||
BOOL torture_rpc_dcom(void)
|
BOOL torture_rpc_dcom(void)
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
|
#include "torture/rpc/rpc.h"
|
||||||
#include "librpc/gen_ndr/ndr_dfs.h"
|
#include "librpc/gen_ndr/ndr_dfs.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,9 +25,7 @@
|
|||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
#include "librpc/gen_ndr/ndr_drsuapi.h"
|
#include "librpc/gen_ndr/ndr_drsuapi.h"
|
||||||
#include "auth/credentials/credentials.h"
|
#include "torture/rpc/rpc.h"
|
||||||
#include "torture/rpc/drsuapi.h"
|
|
||||||
#include "torture/rpc/proto.h"
|
|
||||||
|
|
||||||
BOOL test_DsBind(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
|
BOOL test_DsBind(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
|
||||||
struct DsPrivate *priv)
|
struct DsPrivate *priv)
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "librpc/gen_ndr/drsuapi.h"
|
||||||
|
|
||||||
struct DsPrivate {
|
struct DsPrivate {
|
||||||
struct policy_handle bind_handle;
|
struct policy_handle bind_handle;
|
||||||
|
@ -25,9 +25,7 @@
|
|||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
#include "librpc/gen_ndr/ndr_drsuapi.h"
|
#include "librpc/gen_ndr/ndr_drsuapi.h"
|
||||||
#include "auth/credentials/credentials.h"
|
#include "torture/rpc/rpc.h"
|
||||||
#include "torture/rpc/drsuapi.h"
|
|
||||||
#include "torture/rpc/proto.h"
|
|
||||||
#include "ldb/include/ldb.h"
|
#include "ldb/include/ldb.h"
|
||||||
|
|
||||||
static BOOL test_DsCrackNamesMatrix(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
|
static BOOL test_DsCrackNamesMatrix(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
#include "librpc/gen_ndr/ndr_dssetup.h"
|
#include "librpc/gen_ndr/ndr_dssetup.h"
|
||||||
|
#include "torture/rpc/rpc.h"
|
||||||
|
|
||||||
|
|
||||||
BOOL test_DsRoleGetPrimaryDomainInformation(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
|
BOOL test_DsRoleGetPrimaryDomainInformation(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "lib/cmdline/popt_common.h"
|
#include "lib/cmdline/popt_common.h"
|
||||||
#include "librpc/gen_ndr/ndr_drsuapi.h"
|
#include "librpc/gen_ndr/ndr_drsuapi.h"
|
||||||
#include "libcli/cldap/cldap.h"
|
#include "libcli/cldap/cldap.h"
|
||||||
|
#include "libcli/ldap/ldap_client.h"
|
||||||
#include "torture/ldap/proto.h"
|
#include "torture/ldap/proto.h"
|
||||||
|
|
||||||
struct DsSyncBindInfo {
|
struct DsSyncBindInfo {
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
|
#include "torture/rpc/rpc.h"
|
||||||
#include "lib/events/events.h"
|
#include "lib/events/events.h"
|
||||||
#include "librpc/gen_ndr/ndr_echo.h"
|
#include "librpc/gen_ndr/ndr_echo.h"
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
#include "librpc/gen_ndr/ndr_epmapper.h"
|
#include "librpc/gen_ndr/ndr_epmapper.h"
|
||||||
#include "librpc/rpc/dcerpc_table.h"
|
#include "librpc/rpc/dcerpc_table.h"
|
||||||
|
#include "torture/rpc/rpc.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
#include "librpc/gen_ndr/ndr_eventlog.h"
|
#include "librpc/gen_ndr/ndr_eventlog.h"
|
||||||
#include "librpc/gen_ndr/ndr_lsa.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)
|
static void init_lsa_String(struct lsa_String *name, const char *s)
|
||||||
{
|
{
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
#include "librpc/gen_ndr/ndr_initshutdown.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)
|
static void init_initshutdown_String(TALLOC_CTX *mem_ctx, struct initshutdown_String *name, const char *s)
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#include "libnet/libnet.h"
|
#include "libnet/libnet.h"
|
||||||
|
|
||||||
#include "auth/credentials/credentials.h"
|
#include "auth/credentials/credentials.h"
|
||||||
#include "torture/rpc/proto.h"
|
#include "torture/rpc/rpc.h"
|
||||||
|
|
||||||
#define TORTURE_NETBIOS_NAME "smbtorturejoin"
|
#define TORTURE_NETBIOS_NAME "smbtorturejoin"
|
||||||
|
|
||||||
|
@ -25,8 +25,8 @@
|
|||||||
#include "librpc/gen_ndr/ndr_lsa.h"
|
#include "librpc/gen_ndr/ndr_lsa.h"
|
||||||
#include "lib/events/events.h"
|
#include "lib/events/events.h"
|
||||||
#include "libcli/security/proto.h"
|
#include "libcli/security/proto.h"
|
||||||
#include "auth/credentials/credentials.h"
|
#include "libcli/auth/libcli_auth.h"
|
||||||
#include "libcli/auth/proto.h"
|
#include "torture/rpc/rpc.h"
|
||||||
|
|
||||||
static void init_lsa_String(struct lsa_String *name, const char *s)
|
static void init_lsa_String(struct lsa_String *name, const char *s)
|
||||||
{
|
{
|
||||||
|
@ -24,6 +24,8 @@
|
|||||||
#include "librpc/gen_ndr/ndr_lsa.h"
|
#include "librpc/gen_ndr/ndr_lsa.h"
|
||||||
#include "lib/events/events.h"
|
#include "lib/events/events.h"
|
||||||
#include "libcli/security/proto.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,
|
static BOOL open_policy(TALLOC_CTX *mem_ctx, struct dcerpc_pipe *p,
|
||||||
struct policy_handle **handle)
|
struct policy_handle **handle)
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "librpc/gen_ndr/ndr_mgmt.h"
|
#include "librpc/gen_ndr/ndr_mgmt.h"
|
||||||
#include "auth/gensec/gensec.h"
|
#include "auth/gensec/gensec.h"
|
||||||
#include "librpc/rpc/dcerpc_table.h"
|
#include "librpc/rpc/dcerpc_table.h"
|
||||||
|
#include "torture/rpc/rpc.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -28,8 +28,8 @@
|
|||||||
#include "auth/auth.h"
|
#include "auth/auth.h"
|
||||||
#include "smb.h"
|
#include "smb.h"
|
||||||
#include "lib/cmdline/popt_common.h"
|
#include "lib/cmdline/popt_common.h"
|
||||||
#include "torture/rpc/proto.h"
|
#include "torture/rpc/rpc.h"
|
||||||
#include "libcli/auth/proto.h"
|
#include "libcli/auth/libcli_auth.h"
|
||||||
|
|
||||||
static const char *machine_password;
|
static const char *machine_password;
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "librpc/gen_ndr/ndr_oxidresolver.h"
|
#include "librpc/gen_ndr/ndr_oxidresolver.h"
|
||||||
#include "librpc/gen_ndr/ndr_remact.h"
|
#include "librpc/gen_ndr/ndr_remact.h"
|
||||||
#include "librpc/gen_ndr/ndr_epmapper.h"
|
#include "librpc/gen_ndr/ndr_epmapper.h"
|
||||||
|
#include "torture/rpc/rpc.h"
|
||||||
|
|
||||||
#define CLSID_IMAGEDOC "02B01C80-E03D-101A-B294-00DD010F2BF9"
|
#define CLSID_IMAGEDOC "02B01C80-E03D-101A-B294-00DD010F2BF9"
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
#include "librpc/gen_ndr/ndr_remact.h"
|
#include "librpc/gen_ndr/ndr_remact.h"
|
||||||
#include "librpc/gen_ndr/ndr_epmapper.h"
|
#include "librpc/gen_ndr/ndr_epmapper.h"
|
||||||
|
#include "torture/rpc/rpc.h"
|
||||||
|
|
||||||
#define CLSID_IMAGEDOC "02B01C80-E03D-101A-B294-00DD010F2BF9"
|
#define CLSID_IMAGEDOC "02B01C80-E03D-101A-B294-00DD010F2BF9"
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
#include "librpc/gen_ndr/ndr_rot.h"
|
#include "librpc/gen_ndr/ndr_rot.h"
|
||||||
|
#include "torture/rpc/rpc.h"
|
||||||
|
|
||||||
BOOL torture_rpc_rot(void)
|
BOOL torture_rpc_rot(void)
|
||||||
{
|
{
|
||||||
|
125
source/torture/rpc/rpc.c
Normal file
125
source/torture/rpc/rpc.c
Normal file
@ -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;
|
||||||
|
}
|
30
source/torture/rpc/rpc.h
Normal file
30
source/torture/rpc/rpc.h
Normal file
@ -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__ */
|
@ -27,9 +27,9 @@
|
|||||||
#include "auth/auth.h"
|
#include "auth/auth.h"
|
||||||
#include "lib/crypto/crypto.h"
|
#include "lib/crypto/crypto.h"
|
||||||
#include "lib/cmdline/popt_common.h"
|
#include "lib/cmdline/popt_common.h"
|
||||||
#include "torture/rpc/proto.h"
|
#include "torture/rpc/rpc.h"
|
||||||
#include "auth/gensec/schannel_proto.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_MACHINE_NAME "samlogontest"
|
||||||
#define TEST_USER_NAME "samlogontestuser"
|
#define TEST_USER_NAME "samlogontestuser"
|
||||||
|
@ -26,9 +26,9 @@
|
|||||||
#include "librpc/gen_ndr/ndr_samr.h"
|
#include "librpc/gen_ndr/ndr_samr.h"
|
||||||
#include "smb.h"
|
#include "smb.h"
|
||||||
#include "lib/crypto/crypto.h"
|
#include "lib/crypto/crypto.h"
|
||||||
#include "auth/credentials/credentials.h"
|
#include "libcli/auth/libcli_auth.h"
|
||||||
#include "libcli/auth/proto.h"
|
|
||||||
#include "libcli/security/proto.h"
|
#include "libcli/security/proto.h"
|
||||||
|
#include "torture/rpc/rpc.h"
|
||||||
|
|
||||||
#define TEST_ACCOUNT_NAME "samrtorturetest"
|
#define TEST_ACCOUNT_NAME "samrtorturetest"
|
||||||
#define TEST_ALIASNAME "samrtorturetestalias"
|
#define TEST_ALIASNAME "samrtorturetestalias"
|
||||||
|
@ -28,9 +28,9 @@
|
|||||||
#include "dlinklist.h"
|
#include "dlinklist.h"
|
||||||
#include "lib/crypto/crypto.h"
|
#include "lib/crypto/crypto.h"
|
||||||
#include "system/time.h"
|
#include "system/time.h"
|
||||||
#include "torture/rpc/proto.h"
|
#include "torture/rpc/rpc.h"
|
||||||
#include "auth/gensec/schannel_proto.h"
|
#include "auth/gensec/schannel_proto.h"
|
||||||
#include "libcli/auth/proto.h"
|
#include "libcli/auth/libcli_auth.h"
|
||||||
#include "libcli/security/proto.h"
|
#include "libcli/security/proto.h"
|
||||||
|
|
||||||
#define TEST_MACHINE_NAME "samsynctest"
|
#define TEST_MACHINE_NAME "samsynctest"
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
#include "librpc/gen_ndr/ndr_mgmt.h"
|
#include "librpc/gen_ndr/ndr_mgmt.h"
|
||||||
#include "librpc/rpc/dcerpc_table.h"
|
#include "librpc/rpc/dcerpc_table.h"
|
||||||
|
#include "torture/rpc/rpc.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
work out how many calls there are for an interface
|
work out how many calls there are for an interface
|
||||||
|
@ -23,10 +23,10 @@
|
|||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "librpc/gen_ndr/ndr_netlogon.h"
|
#include "librpc/gen_ndr/ndr_netlogon.h"
|
||||||
#include "auth/credentials/credentials.h"
|
#include "auth/credentials/credentials.h"
|
||||||
#include "torture/rpc/proto.h"
|
#include "torture/rpc/rpc.h"
|
||||||
#include "lib/cmdline/popt_common.h"
|
#include "lib/cmdline/popt_common.h"
|
||||||
#include "auth/gensec/schannel_proto.h"
|
#include "auth/gensec/schannel_proto.h"
|
||||||
#include "libcli/auth/proto.h"
|
#include "libcli/auth/libcli_auth.h"
|
||||||
#include "libcli/security/proto.h"
|
#include "libcli/security/proto.h"
|
||||||
|
|
||||||
#define TEST_MACHINE_NAME "schannel"
|
#define TEST_MACHINE_NAME "schannel"
|
||||||
|
@ -24,9 +24,8 @@
|
|||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
#include "librpc/gen_ndr/ndr_lsa.h"
|
#include "librpc/gen_ndr/ndr_lsa.h"
|
||||||
|
|
||||||
#include "auth/credentials/credentials.h"
|
#include "libcli/auth/libcli_auth.h"
|
||||||
#include "torture/rpc/proto.h"
|
#include "torture/rpc/rpc.h"
|
||||||
#include "libcli/auth/proto.h"
|
|
||||||
|
|
||||||
static void init_lsa_String(struct lsa_String *name, const char *s)
|
static void init_lsa_String(struct lsa_String *name, const char *s)
|
||||||
{
|
{
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
|
#include "torture/rpc/rpc.h"
|
||||||
#include "librpc/gen_ndr/ndr_spoolss.h"
|
#include "librpc/gen_ndr/ndr_spoolss.h"
|
||||||
|
|
||||||
struct test_spoolss_context {
|
struct test_spoolss_context {
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
#include "librpc/gen_ndr/ndr_srvsvc.h"
|
#include "librpc/gen_ndr/ndr_srvsvc.h"
|
||||||
|
#include "torture/rpc/rpc.h"
|
||||||
|
|
||||||
/**************************/
|
/**************************/
|
||||||
/* srvsvc_NetCharDev */
|
/* srvsvc_NetCharDev */
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
#include "librpc/gen_ndr/ndr_svcctl.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)
|
static BOOL test_EnumServicesStatus(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct policy_handle *h)
|
||||||
{
|
{
|
||||||
|
@ -34,10 +34,9 @@
|
|||||||
#include "smb.h"
|
#include "smb.h"
|
||||||
#include "lib/ldb/include/ldb.h"
|
#include "lib/ldb/include/ldb.h"
|
||||||
|
|
||||||
#include "auth/credentials/credentials.h"
|
#include "libcli/auth/libcli_auth.h"
|
||||||
#include "torture/rpc/proto.h"
|
#include "torture/rpc/rpc.h"
|
||||||
#include "libcli/security/proto.h"
|
#include "libcli/security/proto.h"
|
||||||
#include "libcli/auth/proto.h"
|
|
||||||
|
|
||||||
struct test_join {
|
struct test_join {
|
||||||
struct dcerpc_pipe *p;
|
struct dcerpc_pipe *p;
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
|
#include "torture/rpc/rpc.h"
|
||||||
#include "librpc/gen_ndr/ndr_unixinfo.h"
|
#include "librpc/gen_ndr/ndr_unixinfo.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
#include "librpc/gen_ndr/ndr_winreg.h"
|
#include "librpc/gen_ndr/ndr_winreg.h"
|
||||||
#include "libcli/security/proto.h"
|
#include "libcli/security/proto.h"
|
||||||
|
#include "torture/rpc/rpc.h"
|
||||||
|
|
||||||
#define TEST_KEY_BASE "smbtorture test"
|
#define TEST_KEY_BASE "smbtorture test"
|
||||||
#define TEST_KEY1 TEST_KEY_BASE "\\spottyfoot"
|
#define TEST_KEY1 TEST_KEY_BASE "\\spottyfoot"
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
#include "librpc/gen_ndr/ndr_wkssvc.h"
|
#include "librpc/gen_ndr/ndr_wkssvc.h"
|
||||||
|
#include "torture/rpc/rpc.h"
|
||||||
|
|
||||||
|
|
||||||
static BOOL test_NetWkstaGetInfo(struct dcerpc_pipe *p,
|
static BOOL test_NetWkstaGetInfo(struct dcerpc_pipe *p,
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
Unix SMB/CIFS implementation.
|
Unix SMB/CIFS implementation.
|
||||||
SMB torture tester
|
SMB torture tester
|
||||||
Copyright (C) Andrew Tridgell 1997-2003
|
Copyright (C) Andrew Tridgell 1997-2003
|
||||||
|
Copyright (C) Jelmer Vernooij 2006
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -27,15 +28,15 @@
|
|||||||
#include "libcli/raw/ioctl.h"
|
#include "libcli/raw/ioctl.h"
|
||||||
#include "libcli/libcli.h"
|
#include "libcli/libcli.h"
|
||||||
#include "lib/ldb/include/ldb.h"
|
#include "lib/ldb/include/ldb.h"
|
||||||
#include "librpc/rpc/dcerpc_table.h"
|
|
||||||
#include "lib/events/events.h"
|
#include "lib/events/events.h"
|
||||||
#include "libcli/resolve/resolve.h"
|
#include "libcli/resolve/resolve.h"
|
||||||
#include "auth/credentials/credentials.h"
|
#include "auth/credentials/credentials.h"
|
||||||
|
#include "librpc/rpc/dcerpc_table.h"
|
||||||
|
#include "libcli/ldap/ldap_client.h"
|
||||||
|
|
||||||
#include "torture/basic/proto.h"
|
#include "torture/basic/proto.h"
|
||||||
#include "torture/raw/proto.h"
|
#include "torture/raw/proto.h"
|
||||||
#include "torture/smb2/proto.h"
|
#include "torture/smb2/proto.h"
|
||||||
#include "torture/rpc/proto.h"
|
|
||||||
#include "torture/rap/proto.h"
|
#include "torture/rap/proto.h"
|
||||||
#include "torture/auth/proto.h"
|
#include "torture/auth/proto.h"
|
||||||
#include "torture/local/proto.h"
|
#include "torture/local/proto.h"
|
||||||
@ -140,63 +141,6 @@ BOOL torture_close_connection(struct smbcli_state *c)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* check if the server produced the expected error code */
|
/* check if the server produced the expected error code */
|
||||||
BOOL check_error(const char *location, struct smbcli_state *c,
|
BOOL check_error(const char *location, struct smbcli_state *c,
|
||||||
@ -2242,7 +2186,6 @@ static struct {
|
|||||||
{"BENCH-TORTURE", NULL, run_torture},
|
{"BENCH-TORTURE", NULL, run_torture},
|
||||||
{"BENCH-NBT", torture_bench_nbt, 0},
|
{"BENCH-NBT", torture_bench_nbt, 0},
|
||||||
{"BENCH-WINS", torture_bench_wins, 0},
|
{"BENCH-WINS", torture_bench_wins, 0},
|
||||||
{"BENCH-RPC", torture_bench_rpc, 0},
|
|
||||||
{"BENCH-CLDAP", torture_bench_cldap, 0},
|
{"BENCH-CLDAP", torture_bench_cldap, 0},
|
||||||
|
|
||||||
/* RAW smb tests */
|
/* RAW smb tests */
|
||||||
@ -2295,42 +2238,6 @@ static struct {
|
|||||||
{"SCAN-IOCTL", torture_ioctl_test, 0},
|
{"SCAN-IOCTL", torture_ioctl_test, 0},
|
||||||
{"SCAN-RAP", torture_rap_scan, 0},
|
{"SCAN-RAP", torture_rap_scan, 0},
|
||||||
|
|
||||||
/* rpc testers */
|
|
||||||
{"RPC-LSA", torture_rpc_lsa, 0},
|
|
||||||
{"RPC-LSALOOKUP", torture_rpc_lsa_lookup, 0},
|
|
||||||
{"RPC-SECRETS", torture_rpc_lsa_secrets, 0},
|
|
||||||
{"RPC-ECHO", torture_rpc_echo, 0},
|
|
||||||
{"RPC-DFS", torture_rpc_dfs, 0},
|
|
||||||
{"RPC-SPOOLSS", torture_rpc_spoolss, 0},
|
|
||||||
{"RPC-SAMR", torture_rpc_samr, 0},
|
|
||||||
{"RPC-UNIXINFO", torture_rpc_unixinfo, 0},
|
|
||||||
{"RPC-NETLOGON", torture_rpc_netlogon, 0},
|
|
||||||
{"RPC-SAMLOGON", torture_rpc_samlogon, 0},
|
|
||||||
{"RPC-SAMSYNC", torture_rpc_samsync, 0},
|
|
||||||
{"RPC-SCHANNEL", torture_rpc_schannel, 0},
|
|
||||||
{"RPC-WKSSVC", torture_rpc_wkssvc, 0},
|
|
||||||
{"RPC-SRVSVC", torture_rpc_srvsvc, 0},
|
|
||||||
{"RPC-SVCCTL", torture_rpc_svcctl, 0},
|
|
||||||
{"RPC-ATSVC", torture_rpc_atsvc, 0},
|
|
||||||
{"RPC-EVENTLOG", torture_rpc_eventlog, 0},
|
|
||||||
{"RPC-EPMAPPER", torture_rpc_epmapper, 0},
|
|
||||||
{"RPC-WINREG", torture_rpc_winreg, 0},
|
|
||||||
{"RPC-INITSHUTDOWN", torture_rpc_initshutdown, 0},
|
|
||||||
{"RPC-OXIDRESOLVE", torture_rpc_oxidresolve, 0},
|
|
||||||
{"RPC-REMACT", torture_rpc_remact, 0},
|
|
||||||
{"RPC-MGMT", torture_rpc_mgmt, 0},
|
|
||||||
{"RPC-SCANNER", torture_rpc_scanner, 0},
|
|
||||||
{"RPC-AUTOIDL", torture_rpc_autoidl, 0},
|
|
||||||
{"RPC-COUNTCALLS", torture_rpc_countcalls, 0},
|
|
||||||
{"RPC-MULTIBIND", torture_multi_bind, 0},
|
|
||||||
{"RPC-DRSUAPI", torture_rpc_drsuapi, 0},
|
|
||||||
{"RPC-CRACKNAMES", torture_rpc_drsuapi_cracknames, 0},
|
|
||||||
{"RPC-ROT", torture_rpc_rot, 0},
|
|
||||||
{"RPC-DSSETUP", torture_rpc_dssetup, 0},
|
|
||||||
{"RPC-ALTERCONTEXT", torture_rpc_alter_context, 0},
|
|
||||||
{"RPC-JOIN", torture_rpc_join, 0},
|
|
||||||
{"RPC-DSSYNC", torture_rpc_dssync, 0},
|
|
||||||
|
|
||||||
/* local (no server) testers */
|
/* local (no server) testers */
|
||||||
{"LOCAL-NTLMSSP", torture_ntlmssp_self_check, 0},
|
{"LOCAL-NTLMSSP", torture_ntlmssp_self_check, 0},
|
||||||
{"LOCAL-ICONV", torture_local_iconv, 0},
|
{"LOCAL-ICONV", torture_local_iconv, 0},
|
||||||
|
28
source/torture/torture.h
Normal file
28
source/torture/torture.h
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
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_H__
|
||||||
|
#define __TORTURE_H__
|
||||||
|
|
||||||
|
#include "libcli/libcli.h"
|
||||||
|
#include "torture/proto.h"
|
||||||
|
|
||||||
|
#endif /* __TORTURE_H__ */
|
Loading…
Reference in New Issue
Block a user