mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s4/drs(tort): TORTURE_DRS torture module - initial implementation
Drsuapi tests module registers two suites: - DRS-RPC - tests to be executed against remote machine - DRS-UNIT - unit test for internal testing
This commit is contained in:
parent
40a8a22684
commit
6a680cea6a
@ -125,6 +125,10 @@ torture_rpc_OBJ_FILES = $(addprefix $(torturesrcdir)/rpc/, \
|
||||
|
||||
$(eval $(call proto_header_template,$(torturesrcdir)/rpc/proto.h,$(torture_rpc_OBJ_FILES:.o=.c)))
|
||||
|
||||
#################################
|
||||
# RPC/Local DRSUAPI tests
|
||||
mkinclude drs/config.mk
|
||||
|
||||
#################################
|
||||
# Start SUBSYSTEM TORTURE_RAP
|
||||
[MODULE::TORTURE_RAP]
|
||||
|
22
source4/torture/drs/config.mk
Normal file
22
source4/torture/drs/config.mk
Normal file
@ -0,0 +1,22 @@
|
||||
#################################
|
||||
# Start SUBSYSTEM TORTURE_DRS
|
||||
[MODULE::TORTURE_DRS]
|
||||
SUBSYSTEM = smbtorture
|
||||
OUTPUT_TYPE = MERGED_OBJ
|
||||
INIT_FUNCTION = torture_drs_init
|
||||
PRIVATE_DEPENDENCIES = \
|
||||
NDR_TABLE RPC_NDR_UNIXINFO dcerpc_samr RPC_NDR_WINREG RPC_NDR_INITSHUTDOWN \
|
||||
RPC_NDR_OXIDRESOLVER RPC_NDR_EVENTLOG RPC_NDR_ECHO RPC_NDR_SVCCTL \
|
||||
RPC_NDR_NETLOGON dcerpc_atsvc dcerpc_mgmt RPC_NDR_DRSUAPI \
|
||||
RPC_NDR_LSA RPC_NDR_EPMAPPER RPC_NDR_DFS RPC_NDR_FRSAPI RPC_NDR_SPOOLSS \
|
||||
RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_ROT RPC_NDR_DSSETUP \
|
||||
RPC_NDR_REMACT RPC_NDR_OXIDRESOLVER RPC_NDR_NTSVCS WB_HELPER LIBSAMBA-NET \
|
||||
LIBCLI_AUTH POPT_CREDENTIALS TORTURE_LDAP TORTURE_UTIL TORTURE_RAP \
|
||||
dcerpc_server service process_model ntvfs SERVICE_SMB RPC_NDR_BROWSER LIBCLI_DRSUAPI TORTURE_LDB_MODULE
|
||||
# End SUBSYSTEM TORTURE_DRS
|
||||
#################################
|
||||
|
||||
TORTURE_DRS_OBJ_FILES = \
|
||||
$(torturesrcdir)/drs/drs_init.o
|
||||
|
||||
$(eval $(call proto_header_template,$(torturesrcdir)/drs/proto.h,$(TORTURE_DRS_OBJ_FILES:.o=.c)))
|
68
source4/torture/drs/drs_init.c
Normal file
68
source4/torture/drs/drs_init.c
Normal file
@ -0,0 +1,68 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
DRSUAPI utility functions to be used in torture tests
|
||||
|
||||
Copyright (C) Kamen Mazdrashki <kamen.mazdrashki@postpath.com> 2009
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "torture/smbtorture.h"
|
||||
#include "torture/drs/proto.h"
|
||||
|
||||
/**
|
||||
* DRSUAPI tests to be executed remotely
|
||||
*/
|
||||
static struct torture_suite * torture_drs_rpc_suite(TALLOC_CTX *mem_ctx)
|
||||
{
|
||||
struct torture_suite *suite = torture_suite_create(
|
||||
talloc_autofree_context(),
|
||||
"RPC");
|
||||
|
||||
return suite;
|
||||
}
|
||||
|
||||
/**
|
||||
* DRSUAPI tests to be executed remotely
|
||||
*/
|
||||
static struct torture_suite * torture_drs_unit_suite(TALLOC_CTX *mem_ctx)
|
||||
{
|
||||
struct torture_suite *suite = torture_suite_create(
|
||||
talloc_autofree_context(),
|
||||
"UNIT");
|
||||
|
||||
return suite;
|
||||
}
|
||||
|
||||
/**
|
||||
* DRSUAPI torture module initialization
|
||||
*/
|
||||
NTSTATUS torture_drs_init(void)
|
||||
{
|
||||
struct torture_suite *suite = torture_suite_create(
|
||||
talloc_autofree_context(),
|
||||
"DRS");
|
||||
|
||||
torture_suite_add_suite(suite, torture_drs_rpc_suite(suite));
|
||||
torture_suite_add_suite(suite, torture_drs_unit_suite(suite));
|
||||
|
||||
suite->description = talloc_strdup(suite,
|
||||
"DRSUAPI related tests - Remote and Local");
|
||||
|
||||
torture_register_suite(suite);
|
||||
|
||||
return NT_STATUS_OK;
|
||||
}
|
@ -68,6 +68,7 @@ _PUBLIC_ int torture_init(void)
|
||||
extern NTSTATUS torture_raw_init(void);
|
||||
extern NTSTATUS torture_unix_init(void);
|
||||
extern NTSTATUS torture_winbind_init(void);
|
||||
extern NTSTATUS torture_drs_init(void);
|
||||
init_module_fn static_init[] = { STATIC_smbtorture_MODULES };
|
||||
init_module_fn *shared_init = load_samba_modules(NULL, cmdline_lp_ctx, "smbtorture");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user