2006-03-14 18:02:05 +03:00
/*
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
2007-07-10 06:07:03 +04:00
the Free Software Foundation ; either version 3 of the License , or
2006-03-14 18:02:05 +03:00
( 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
2007-07-10 06:07:03 +04:00
along with this program . If not , see < http : //www.gnu.org/licenses/>.
2006-03-14 18:02:05 +03:00
*/
# include "includes.h"
# include "lib/cmdline/popt_common.h"
2010-04-14 00:06:51 +04:00
# include "torture/rpc/torture_rpc.h"
2008-04-27 17:02:46 +04:00
# include "torture/smbtorture.h"
2007-08-21 23:35:43 +04:00
# include "librpc/ndr/ndr_table.h"
2008-10-11 23:31:42 +04:00
# include "../lib/util/dlinklist.h"
2006-03-14 18:02:05 +03:00
2007-08-31 20:43:05 +04:00
static bool torture_rpc_teardown ( struct torture_context * tcase ,
void * data )
{
struct torture_rpc_tcase_data * tcase_data =
( struct torture_rpc_tcase_data * ) data ;
if ( tcase_data - > join_ctx ! = NULL )
2008-06-14 19:24:17 +04:00
torture_leave_domain ( tcase , tcase_data - > join_ctx ) ;
2007-08-31 20:43:05 +04:00
talloc_free ( tcase_data ) ;
return true ;
}
/**
* Obtain the DCE / RPC binding context associated with a torture context .
*
* @ param tctx Torture context
* @ param binding Pointer to store DCE / RPC binding
*/
2007-08-28 23:03:08 +04:00
NTSTATUS torture_rpc_binding ( struct torture_context * tctx ,
2007-08-31 20:43:05 +04:00
struct dcerpc_binding * * binding )
2007-08-28 23:03:08 +04:00
{
NTSTATUS status ;
2007-08-31 20:43:05 +04:00
const char * binding_string = torture_setting_string ( tctx , " binding " ,
NULL ) ;
2007-08-28 23:03:08 +04:00
if ( binding_string = = NULL ) {
2007-08-31 20:43:05 +04:00
torture_comment ( tctx ,
" You must specify a DCE/RPC binding string \n " ) ;
2007-08-28 23:03:08 +04:00
return NT_STATUS_INVALID_PARAMETER ;
}
status = dcerpc_parse_binding ( tctx , binding_string , binding ) ;
if ( NT_STATUS_IS_ERR ( status ) ) {
2007-08-31 20:43:05 +04:00
DEBUG ( 0 , ( " Failed to parse dcerpc binding '%s' \n " ,
binding_string ) ) ;
2007-08-28 23:03:08 +04:00
return status ;
}
return NT_STATUS_OK ;
}
2007-08-31 20:43:05 +04:00
/**
* open a rpc connection to the chosen binding string
*/
2007-08-28 16:54:27 +04:00
_PUBLIC_ NTSTATUS torture_rpc_connection ( struct torture_context * tctx ,
2006-03-14 18:02:05 +03:00
struct dcerpc_pipe * * p ,
2007-08-20 00:46:45 +04:00
const struct ndr_interface_table * table )
2006-03-14 18:02:05 +03:00
{
2007-08-28 16:54:27 +04:00
NTSTATUS status ;
2007-08-28 23:03:08 +04:00
struct dcerpc_binding * binding ;
2006-03-14 18:02:05 +03:00
2011-06-06 08:58:28 +04:00
dcerpc_init ( ) ;
2008-11-02 19:04:22 +03:00
2007-08-28 23:03:08 +04:00
status = torture_rpc_binding ( tctx , & binding ) ;
if ( NT_STATUS_IS_ERR ( status ) )
return status ;
2006-03-14 18:02:05 +03:00
2007-08-28 23:03:08 +04:00
status = dcerpc_pipe_connect_b ( tctx ,
2006-03-14 18:02:05 +03:00
p , binding , table ,
2008-04-22 01:58:23 +04:00
cmdline_credentials , tctx - > ev , tctx - > lp_ctx ) ;
2006-03-14 18:02:05 +03:00
2007-08-28 23:03:08 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
printf ( " Failed to connect to remote server: %s %s \n " ,
dcerpc_binding_string ( tctx , binding ) , nt_errstr ( status ) ) ;
2006-03-22 13:18:31 +03:00
}
2006-04-02 16:02:01 +04:00
return status ;
2006-03-14 18:02:05 +03:00
}
2007-08-31 20:43:05 +04:00
/**
* open a rpc connection to a specific transport
*/
2007-08-28 16:54:27 +04:00
NTSTATUS torture_rpc_connection_transport ( struct torture_context * tctx ,
2006-03-14 18:02:05 +03:00
struct dcerpc_pipe * * p ,
2007-08-20 00:46:45 +04:00
const struct ndr_interface_table * table ,
2007-02-28 18:57:52 +03:00
enum dcerpc_transport_t transport ,
uint32_t assoc_group_id )
2006-03-14 18:02:05 +03:00
{
2007-08-31 20:43:05 +04:00
NTSTATUS status ;
2007-08-28 23:03:08 +04:00
struct dcerpc_binding * binding ;
2006-03-14 18:02:05 +03:00
2007-08-28 23:03:08 +04:00
status = torture_rpc_binding ( tctx , & binding ) ;
if ( NT_STATUS_IS_ERR ( status ) )
2006-03-14 18:02:05 +03:00
return status ;
2007-08-28 23:03:08 +04:00
binding - > transport = transport ;
binding - > assoc_group_id = assoc_group_id ;
2006-03-14 18:02:05 +03:00
2007-09-01 02:34:52 +04:00
status = dcerpc_pipe_connect_b ( tctx , p , binding , table ,
2008-04-22 01:58:23 +04:00
cmdline_credentials , tctx - > ev , tctx - > lp_ctx ) ;
2006-03-14 18:02:05 +03:00
2007-09-01 02:34:52 +04:00
if ( NT_STATUS_IS_ERR ( status ) ) {
2006-03-14 18:02:05 +03:00
* p = NULL ;
}
2007-09-01 02:34:52 +04:00
2006-03-14 18:02:05 +03:00
return status ;
}
2009-06-26 18:51:53 +04:00
static bool torture_rpc_setup_machine_workstation ( struct torture_context * tctx ,
void * * data )
{
NTSTATUS status ;
struct dcerpc_binding * binding ;
struct torture_rpc_tcase * tcase = talloc_get_type ( tctx - > active_tcase ,
struct torture_rpc_tcase ) ;
struct torture_rpc_tcase_data * tcase_data ;
status = torture_rpc_binding ( tctx , & binding ) ;
if ( NT_STATUS_IS_ERR ( status ) )
return false ;
* data = tcase_data = talloc_zero ( tctx , struct torture_rpc_tcase_data ) ;
tcase_data - > credentials = cmdline_credentials ;
tcase_data - > join_ctx = torture_join_domain ( tctx , tcase - > machine_name ,
ACB_WSTRUST ,
& tcase_data - > credentials ) ;
if ( tcase_data - > join_ctx = = NULL )
torture_fail ( tctx , " Failed to join as WORKSTATION " ) ;
status = dcerpc_pipe_connect_b ( tctx ,
& ( tcase_data - > pipe ) ,
binding ,
tcase - > table ,
tcase_data - > credentials , tctx - > ev , tctx - > lp_ctx ) ;
torture_assert_ntstatus_ok ( tctx , status , " Error connecting to server " ) ;
2010-08-12 23:35:53 +04:00
return NT_STATUS_IS_OK ( status ) ;
2009-06-26 18:51:53 +04:00
}
static bool torture_rpc_setup_machine_bdc ( struct torture_context * tctx ,
void * * data )
2007-08-31 20:43:05 +04:00
{
NTSTATUS status ;
struct dcerpc_binding * binding ;
struct torture_rpc_tcase * tcase = talloc_get_type ( tctx - > active_tcase ,
struct torture_rpc_tcase ) ;
struct torture_rpc_tcase_data * tcase_data ;
status = torture_rpc_binding ( tctx , & binding ) ;
if ( NT_STATUS_IS_ERR ( status ) )
return false ;
* data = tcase_data = talloc_zero ( tctx , struct torture_rpc_tcase_data ) ;
tcase_data - > credentials = cmdline_credentials ;
2007-12-03 17:53:28 +03:00
tcase_data - > join_ctx = torture_join_domain ( tctx , tcase - > machine_name ,
2007-08-31 20:43:05 +04:00
ACB_SVRTRUST ,
& tcase_data - > credentials ) ;
if ( tcase_data - > join_ctx = = NULL )
torture_fail ( tctx , " Failed to join as BDC " ) ;
status = dcerpc_pipe_connect_b ( tctx ,
& ( tcase_data - > pipe ) ,
binding ,
tcase - > table ,
2008-04-22 01:58:23 +04:00
tcase_data - > credentials , tctx - > ev , tctx - > lp_ctx ) ;
2007-08-31 20:43:05 +04:00
torture_assert_ntstatus_ok ( tctx , status , " Error connecting to server " ) ;
2010-08-12 23:35:53 +04:00
return NT_STATUS_IS_OK ( status ) ;
2007-08-31 20:43:05 +04:00
}
2009-06-26 18:51:53 +04:00
_PUBLIC_ struct torture_rpc_tcase * torture_suite_add_machine_workstation_rpc_iface_tcase (
struct torture_suite * suite ,
const char * name ,
const struct ndr_interface_table * table ,
const char * machine_name )
{
struct torture_rpc_tcase * tcase = talloc ( suite ,
struct torture_rpc_tcase ) ;
torture_suite_init_rpc_tcase ( suite , tcase , name , table ) ;
tcase - > machine_name = talloc_strdup ( tcase , machine_name ) ;
tcase - > tcase . setup = torture_rpc_setup_machine_workstation ;
tcase - > tcase . teardown = torture_rpc_teardown ;
return tcase ;
}
_PUBLIC_ struct torture_rpc_tcase * torture_suite_add_machine_bdc_rpc_iface_tcase (
2007-08-31 20:43:05 +04:00
struct torture_suite * suite ,
const char * name ,
const struct ndr_interface_table * table ,
const char * machine_name )
{
struct torture_rpc_tcase * tcase = talloc ( suite ,
struct torture_rpc_tcase ) ;
2007-09-01 02:34:52 +04:00
torture_suite_init_rpc_tcase ( suite , tcase , name , table ) ;
2007-08-31 20:43:05 +04:00
tcase - > machine_name = talloc_strdup ( tcase , machine_name ) ;
2009-06-26 18:51:53 +04:00
tcase - > tcase . setup = torture_rpc_setup_machine_bdc ;
2007-08-31 20:43:05 +04:00
tcase - > tcase . teardown = torture_rpc_teardown ;
return tcase ;
}
2007-09-01 02:34:52 +04:00
_PUBLIC_ bool torture_suite_init_rpc_tcase ( struct torture_suite * suite ,
struct torture_rpc_tcase * tcase ,
const char * name ,
const struct ndr_interface_table * table )
{
if ( ! torture_suite_init_tcase ( suite , ( struct torture_tcase * ) tcase , name ) )
return false ;
tcase - > table = table ;
return true ;
}
2007-08-28 17:49:34 +04:00
static bool torture_rpc_setup_anonymous ( struct torture_context * tctx ,
2007-08-31 20:43:05 +04:00
void * * data )
2007-08-28 17:49:34 +04:00
{
NTSTATUS status ;
2007-08-28 23:03:08 +04:00
struct dcerpc_binding * binding ;
2007-08-31 20:43:05 +04:00
struct torture_rpc_tcase_data * tcase_data ;
struct torture_rpc_tcase * tcase = talloc_get_type ( tctx - > active_tcase ,
struct torture_rpc_tcase ) ;
2007-08-28 17:49:34 +04:00
2007-08-28 23:03:08 +04:00
status = torture_rpc_binding ( tctx , & binding ) ;
if ( NT_STATUS_IS_ERR ( status ) )
return false ;
2007-08-31 20:43:05 +04:00
* data = tcase_data = talloc_zero ( tctx , struct torture_rpc_tcase_data ) ;
tcase_data - > credentials = cli_credentials_init_anon ( tctx ) ;
2007-08-28 17:49:34 +04:00
2007-08-28 23:03:08 +04:00
status = dcerpc_pipe_connect_b ( tctx ,
2007-08-31 20:43:05 +04:00
& ( tcase_data - > pipe ) ,
2007-08-28 17:49:34 +04:00
binding ,
2007-08-28 18:42:37 +04:00
tcase - > table ,
2008-04-22 01:58:23 +04:00
tcase_data - > credentials , tctx - > ev , tctx - > lp_ctx ) ;
2007-08-28 17:49:34 +04:00
torture_assert_ntstatus_ok ( tctx , status , " Error connecting to server " ) ;
2010-08-12 23:35:53 +04:00
return NT_STATUS_IS_OK ( status ) ;
2007-08-28 17:49:34 +04:00
}
2006-10-16 17:06:41 +04:00
static bool torture_rpc_setup ( struct torture_context * tctx , void * * data )
{
NTSTATUS status ;
2007-08-28 18:42:37 +04:00
struct torture_rpc_tcase * tcase = talloc_get_type (
tctx - > active_tcase , struct torture_rpc_tcase ) ;
2007-08-31 20:43:05 +04:00
struct torture_rpc_tcase_data * tcase_data ;
* data = tcase_data = talloc_zero ( tctx , struct torture_rpc_tcase_data ) ;
tcase_data - > credentials = cmdline_credentials ;
2006-10-16 17:06:41 +04:00
status = torture_rpc_connection ( tctx ,
2007-08-31 20:43:05 +04:00
& ( tcase_data - > pipe ) ,
2007-09-01 02:34:52 +04:00
tcase - > table ) ;
2006-10-16 17:06:41 +04:00
torture_assert_ntstatus_ok ( tctx , status , " Error connecting to server " ) ;
2010-08-12 23:35:53 +04:00
return NT_STATUS_IS_OK ( status ) ;
2006-10-16 17:06:41 +04:00
}
2007-08-31 20:43:05 +04:00
2006-10-16 17:06:41 +04:00
2007-08-28 18:42:37 +04:00
_PUBLIC_ struct torture_rpc_tcase * torture_suite_add_anon_rpc_iface_tcase ( struct torture_suite * suite ,
2007-08-28 17:49:34 +04:00
const char * name ,
const struct ndr_interface_table * table )
{
2007-08-28 18:42:37 +04:00
struct torture_rpc_tcase * tcase = talloc ( suite , struct torture_rpc_tcase ) ;
2007-09-01 02:34:52 +04:00
torture_suite_init_rpc_tcase ( suite , tcase , name , table ) ;
2007-08-28 17:49:34 +04:00
2007-08-28 18:42:37 +04:00
tcase - > tcase . setup = torture_rpc_setup_anonymous ;
tcase - > tcase . teardown = torture_rpc_teardown ;
2007-08-28 17:49:34 +04:00
return tcase ;
}
2007-08-28 18:42:37 +04:00
_PUBLIC_ struct torture_rpc_tcase * torture_suite_add_rpc_iface_tcase ( struct torture_suite * suite ,
2006-11-04 07:48:46 +03:00
const char * name ,
2007-08-20 00:46:45 +04:00
const struct ndr_interface_table * table )
2006-10-16 17:06:41 +04:00
{
2007-08-28 18:42:37 +04:00
struct torture_rpc_tcase * tcase = talloc ( suite , struct torture_rpc_tcase ) ;
2007-09-01 02:34:52 +04:00
torture_suite_init_rpc_tcase ( suite , tcase , name , table ) ;
2006-10-16 17:06:41 +04:00
2007-08-28 18:42:37 +04:00
tcase - > tcase . setup = torture_rpc_setup ;
tcase - > tcase . teardown = torture_rpc_teardown ;
2006-10-16 17:06:41 +04:00
return tcase ;
}
static bool torture_rpc_wrap_test ( struct torture_context * tctx ,
struct torture_tcase * tcase ,
struct torture_test * test )
{
bool ( * fn ) ( struct torture_context * , struct dcerpc_pipe * ) ;
2007-08-31 20:43:05 +04:00
struct torture_rpc_tcase_data * tcase_data =
( struct torture_rpc_tcase_data * ) tcase - > data ;
2006-10-16 17:06:41 +04:00
fn = test - > fn ;
2007-08-31 20:43:05 +04:00
return fn ( tctx , tcase_data - > pipe ) ;
2006-10-16 17:06:41 +04:00
}
2007-08-26 19:16:40 +04:00
static bool torture_rpc_wrap_test_ex ( struct torture_context * tctx ,
struct torture_tcase * tcase ,
struct torture_test * test )
{
bool ( * fn ) ( struct torture_context * , struct dcerpc_pipe * , const void * ) ;
2007-08-31 20:43:05 +04:00
struct torture_rpc_tcase_data * tcase_data =
( struct torture_rpc_tcase_data * ) tcase - > data ;
2007-08-26 19:16:40 +04:00
fn = test - > fn ;
2007-08-31 20:43:05 +04:00
return fn ( tctx , tcase_data - > pipe , test - > data ) ;
}
static bool torture_rpc_wrap_test_creds ( struct torture_context * tctx ,
struct torture_tcase * tcase ,
struct torture_test * test )
{
bool ( * fn ) ( struct torture_context * , struct dcerpc_pipe * , struct cli_credentials * ) ;
struct torture_rpc_tcase_data * tcase_data =
( struct torture_rpc_tcase_data * ) tcase - > data ;
fn = test - > fn ;
return fn ( tctx , tcase_data - > pipe , tcase_data - > credentials ) ;
2007-08-26 19:16:40 +04:00
}
2010-11-02 09:14:55 +03:00
static bool torture_rpc_wrap_test_join ( struct torture_context * tctx ,
struct torture_tcase * tcase ,
struct torture_test * test )
{
bool ( * fn ) ( struct torture_context * , struct dcerpc_pipe * , struct cli_credentials * , struct test_join * ) ;
struct torture_rpc_tcase_data * tcase_data =
( struct torture_rpc_tcase_data * ) tcase - > data ;
fn = test - > fn ;
return fn ( tctx , tcase_data - > pipe , tcase_data - > credentials , tcase_data - > join_ctx ) ;
}
2006-10-16 17:06:41 +04:00
_PUBLIC_ struct torture_test * torture_rpc_tcase_add_test (
2007-08-28 18:42:37 +04:00
struct torture_rpc_tcase * tcase ,
2006-10-16 17:06:41 +04:00
const char * name ,
bool ( * fn ) ( struct torture_context * , struct dcerpc_pipe * ) )
{
struct torture_test * test ;
test = talloc ( tcase , struct torture_test ) ;
test - > name = talloc_strdup ( test , name ) ;
test - > description = NULL ;
test - > run = torture_rpc_wrap_test ;
test - > dangerous = false ;
test - > data = NULL ;
test - > fn = fn ;
2007-08-28 18:42:37 +04:00
DLIST_ADD ( tcase - > tcase . tests , test ) ;
2006-10-16 17:06:41 +04:00
return test ;
}
2007-08-31 20:43:05 +04:00
_PUBLIC_ struct torture_test * torture_rpc_tcase_add_test_creds (
struct torture_rpc_tcase * tcase ,
const char * name ,
bool ( * fn ) ( struct torture_context * , struct dcerpc_pipe * , struct cli_credentials * ) )
{
struct torture_test * test ;
test = talloc ( tcase , struct torture_test ) ;
test - > name = talloc_strdup ( test , name ) ;
test - > description = NULL ;
test - > run = torture_rpc_wrap_test_creds ;
test - > dangerous = false ;
test - > data = NULL ;
test - > fn = fn ;
DLIST_ADD ( tcase - > tcase . tests , test ) ;
return test ;
}
2010-11-02 09:14:55 +03:00
_PUBLIC_ struct torture_test * torture_rpc_tcase_add_test_join (
struct torture_rpc_tcase * tcase ,
const char * name ,
bool ( * fn ) ( struct torture_context * , struct dcerpc_pipe * ,
struct cli_credentials * , struct test_join * ) )
{
struct torture_test * test ;
test = talloc ( tcase , struct torture_test ) ;
test - > name = talloc_strdup ( test , name ) ;
test - > description = NULL ;
test - > run = torture_rpc_wrap_test_join ;
test - > dangerous = false ;
test - > data = NULL ;
test - > fn = fn ;
DLIST_ADD ( tcase - > tcase . tests , test ) ;
return test ;
}
2007-08-26 19:16:40 +04:00
_PUBLIC_ struct torture_test * torture_rpc_tcase_add_test_ex (
2007-08-28 18:42:37 +04:00
struct torture_rpc_tcase * tcase ,
2007-08-26 19:16:40 +04:00
const char * name ,
bool ( * fn ) ( struct torture_context * , struct dcerpc_pipe * ,
void * ) ,
void * userdata )
{
struct torture_test * test ;
test = talloc ( tcase , struct torture_test ) ;
test - > name = talloc_strdup ( test , name ) ;
test - > description = NULL ;
test - > run = torture_rpc_wrap_test_ex ;
test - > dangerous = false ;
test - > data = userdata ;
test - > fn = fn ;
2007-08-28 18:42:37 +04:00
DLIST_ADD ( tcase - > tcase . tests , test ) ;
2007-08-26 19:16:40 +04:00
return test ;
}
2006-03-14 18:02:05 +03:00
NTSTATUS torture_rpc_init ( void )
{
2010-12-11 05:26:31 +03:00
struct torture_suite * suite = torture_suite_create ( talloc_autofree_context ( ) , " rpc " ) ;
2006-12-13 02:48:28 +03:00
2007-08-20 01:23:03 +04:00
ndr_table_init ( ) ;
2006-03-17 03:45:52 +03:00
2010-12-11 05:26:31 +03:00
torture_suite_add_simple_test ( suite , " lsa " , torture_rpc_lsa ) ;
torture_suite_add_simple_test ( suite , " lsalookup " , torture_rpc_lsa_lookup ) ;
torture_suite_add_simple_test ( suite , " lsa-getuser " , torture_rpc_lsa_get_user ) ;
2009-04-17 03:28:41 +04:00
torture_suite_add_suite ( suite , torture_rpc_lsa_lookup_sids ( suite ) ) ;
2009-05-11 18:28:42 +04:00
torture_suite_add_suite ( suite , torture_rpc_lsa_lookup_names ( suite ) ) ;
2007-09-02 16:26:06 +04:00
torture_suite_add_suite ( suite , torture_rpc_lsa_secrets ( suite ) ) ;
2009-07-16 02:56:17 +04:00
torture_suite_add_suite ( suite , torture_rpc_lsa_trusted_domains ( suite ) ) ;
2010-06-22 17:06:27 +04:00
torture_suite_add_suite ( suite , torture_rpc_lsa_forest_trust ( suite ) ) ;
2009-07-16 04:10:23 +04:00
torture_suite_add_suite ( suite , torture_rpc_lsa_privileges ( suite ) ) ;
2007-09-01 02:34:52 +04:00
torture_suite_add_suite ( suite , torture_rpc_echo ( suite ) ) ;
2010-03-20 00:37:53 +03:00
torture_suite_add_suite ( suite , torture_rpc_dfs ( suite ) ) ;
2007-10-16 15:44:43 +04:00
torture_suite_add_suite ( suite , torture_rpc_frsapi ( suite ) ) ;
2007-09-01 02:34:52 +04:00
torture_suite_add_suite ( suite , torture_rpc_unixinfo ( suite ) ) ;
torture_suite_add_suite ( suite , torture_rpc_eventlog ( suite ) ) ;
torture_suite_add_suite ( suite , torture_rpc_atsvc ( suite ) ) ;
2007-08-28 23:03:08 +04:00
torture_suite_add_suite ( suite , torture_rpc_wkssvc ( suite ) ) ;
2007-08-26 19:16:40 +04:00
torture_suite_add_suite ( suite , torture_rpc_handles ( suite ) ) ;
2008-09-30 08:40:15 +04:00
torture_suite_add_suite ( suite , torture_rpc_object_uuid ( suite ) ) ;
2007-08-26 19:16:40 +04:00
torture_suite_add_suite ( suite , torture_rpc_winreg ( suite ) ) ;
2010-05-19 01:40:43 +04:00
torture_suite_add_suite ( suite , torture_rpc_spoolss ( suite ) ) ;
2012-05-21 13:45:12 +04:00
# ifdef AD_DC_BUILD_IS_ENABLED
2007-09-03 17:13:25 +04:00
torture_suite_add_suite ( suite , torture_rpc_spoolss_notify ( suite ) ) ;
2012-05-21 13:45:12 +04:00
# endif
2013-05-17 13:23:22 +04:00
torture_suite_add_suite ( suite , torture_rpc_spoolss_win ( suite ) ) ;
2009-07-02 23:49:15 +04:00
torture_suite_add_suite ( suite , torture_rpc_spoolss_driver ( suite ) ) ;
2010-06-04 21:03:11 +04:00
torture_suite_add_suite ( suite , torture_rpc_spoolss_access ( suite ) ) ;
2010-12-11 05:26:31 +03:00
torture_suite_add_simple_test ( suite , " samr " , torture_rpc_samr ) ;
torture_suite_add_simple_test ( suite , " samr.users " , torture_rpc_samr_users ) ;
torture_suite_add_simple_test ( suite , " samr.passwords " , torture_rpc_samr_passwords ) ;
2007-08-31 21:38:37 +04:00
torture_suite_add_suite ( suite , torture_rpc_netlogon ( suite ) ) ;
2009-08-27 00:27:07 +04:00
torture_suite_add_suite ( suite , torture_rpc_netlogon_s3 ( suite ) ) ;
2009-11-09 19:32:31 +03:00
torture_suite_add_suite ( suite , torture_rpc_netlogon_admin ( suite ) ) ;
2008-08-27 15:36:27 +04:00
torture_suite_add_suite ( suite , torture_rpc_remote_pac ( suite ) ) ;
2010-12-11 05:26:31 +03:00
torture_suite_add_simple_test ( suite , " samlogon " , torture_rpc_samlogon ) ;
torture_suite_add_simple_test ( suite , " samsync " , torture_rpc_samsync ) ;
torture_suite_add_simple_test ( suite , " schannel " , torture_rpc_schannel ) ;
torture_suite_add_simple_test ( suite , " schannel2 " , torture_rpc_schannel2 ) ;
torture_suite_add_simple_test ( suite , " bench-schannel1 " , torture_rpc_schannel_bench1 ) ;
2007-08-28 17:49:34 +04:00
torture_suite_add_suite ( suite , torture_rpc_srvsvc ( suite ) ) ;
2007-08-28 16:54:27 +04:00
torture_suite_add_suite ( suite , torture_rpc_svcctl ( suite ) ) ;
2007-09-21 02:57:57 +04:00
torture_suite_add_suite ( suite , torture_rpc_samr_accessmask ( suite ) ) ;
2009-06-26 18:53:51 +04:00
torture_suite_add_suite ( suite , torture_rpc_samr_workstation_auth ( suite ) ) ;
2008-12-08 15:10:56 +03:00
torture_suite_add_suite ( suite , torture_rpc_samr_passwords_pwdlastset ( suite ) ) ;
2010-01-11 23:18:51 +03:00
torture_suite_add_suite ( suite , torture_rpc_samr_passwords_badpwdcount ( suite ) ) ;
2010-01-15 20:08:57 +03:00
torture_suite_add_suite ( suite , torture_rpc_samr_passwords_lockout ( suite ) ) ;
2012-12-11 12:25:53 +04:00
torture_suite_add_suite ( suite , torture_rpc_samr_passwords_validate ( suite ) ) ;
2009-05-18 21:37:13 +04:00
torture_suite_add_suite ( suite , torture_rpc_samr_user_privileges ( suite ) ) ;
2009-05-25 15:08:58 +04:00
torture_suite_add_suite ( suite , torture_rpc_samr_large_dc ( suite ) ) ;
2011-09-15 10:54:44 +04:00
torture_suite_add_suite ( suite , torture_rpc_samr_priv ( suite ) ) ;
2007-08-28 20:24:18 +04:00
torture_suite_add_suite ( suite , torture_rpc_epmapper ( suite ) ) ;
torture_suite_add_suite ( suite , torture_rpc_initshutdown ( suite ) ) ;
torture_suite_add_suite ( suite , torture_rpc_oxidresolve ( suite ) ) ;
torture_suite_add_suite ( suite , torture_rpc_remact ( suite ) ) ;
2010-12-11 05:26:31 +03:00
torture_suite_add_simple_test ( suite , " mgmt " , torture_rpc_mgmt ) ;
torture_suite_add_simple_test ( suite , " scanner " , torture_rpc_scanner ) ;
torture_suite_add_simple_test ( suite , " autoidl " , torture_rpc_autoidl ) ;
torture_suite_add_simple_test ( suite , " countcalls " , torture_rpc_countcalls ) ;
torture_suite_add_simple_test ( suite , " multibind " , torture_multi_bind ) ;
torture_suite_add_simple_test ( suite , " authcontext " , torture_bind_authcontext ) ;
2010-03-19 21:58:24 +03:00
torture_suite_add_suite ( suite , torture_rpc_samba3 ( suite ) ) ;
2009-09-11 02:39:19 +04:00
torture_rpc_drsuapi_tcase ( suite ) ;
2009-08-28 19:35:31 +04:00
torture_rpc_drsuapi_cracknames_tcase ( suite ) ;
2007-09-02 07:14:32 +04:00
torture_suite_add_suite ( suite , torture_rpc_dssetup ( suite ) ) ;
2008-12-06 14:39:58 +03:00
torture_suite_add_suite ( suite , torture_rpc_browser ( suite ) ) ;
2010-12-11 05:26:31 +03:00
torture_suite_add_simple_test ( suite , " altercontext " , torture_rpc_alter_context ) ;
torture_suite_add_simple_test ( suite , " join " , torture_rpc_join ) ;
2009-12-23 22:54:30 +03:00
torture_drs_rpc_dsgetinfo_tcase ( suite ) ;
2010-12-11 05:26:31 +03:00
torture_suite_add_simple_test ( suite , " bench-rpc " , torture_bench_rpc ) ;
torture_suite_add_simple_test ( suite , " asyncbind " , torture_async_bind ) ;
2008-11-11 14:36:07 +03:00
torture_suite_add_suite ( suite , torture_rpc_ntsvcs ( suite ) ) ;
2010-07-14 03:31:12 +04:00
torture_suite_add_suite ( suite , torture_rpc_bind ( suite ) ) ;
2012-06-07 14:38:20 +04:00
# ifdef AD_DC_BUILD_IS_ENABLED /* Add Heimdal-specific KDC test */
2010-07-26 03:01:03 +04:00
torture_suite_add_suite ( suite , torture_rpc_backupkey ( suite ) ) ;
2012-05-02 22:16:01 +04:00
# endif
2012-03-09 19:02:19 +04:00
torture_suite_add_suite ( suite , torture_rpc_fsrvp ( suite ) ) ;
2006-10-16 17:06:41 +04:00
2006-12-13 02:48:28 +03:00
suite - > description = talloc_strdup ( suite , " DCE/RPC protocol and interface tests " ) ;
2006-10-16 17:06:41 +04:00
torture_register_suite ( suite ) ;
2006-03-14 18:02:05 +03:00
return NT_STATUS_OK ;
}