mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s4-torture: Make the backupkey test as a noop with MIT Kerberos.
The test is planned but will be skipped in the MIT case this way. We need to rewrite the test using a proper cryto/tls library. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
547af4c3c7
commit
c5d91e0e0f
@ -20,12 +20,15 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "../libcli/security/security.h"
|
||||
|
||||
#include "torture/rpc/torture_rpc.h"
|
||||
#include "torture/ndr/ndr.h"
|
||||
|
||||
#ifdef SAMBA4_USES_HEIMDAL
|
||||
#include "librpc/gen_ndr/ndr_backupkey_c.h"
|
||||
#include "librpc/gen_ndr/ndr_backupkey.h"
|
||||
#include "librpc/gen_ndr/ndr_lsa_c.h"
|
||||
#include "librpc/gen_ndr/ndr_security.h"
|
||||
#include "torture/rpc/torture_rpc.h"
|
||||
#include "torture/ndr/ndr.h"
|
||||
#include "lib/cmdline/popt_common.h"
|
||||
#include "libcli/auth/proto.h"
|
||||
#include "lib/crypto/arcfour.h"
|
||||
@ -2032,12 +2035,23 @@ static bool test_ServerWrap_encrypt_decrypt_wrong_sid(struct torture_context *tc
|
||||
{
|
||||
return test_ServerWrap_decrypt_wrong_stuff(tctx, p, WRONG_SID);
|
||||
}
|
||||
#else
|
||||
static bool test_skip(struct torture_context *tctx,
|
||||
void *data)
|
||||
{
|
||||
torture_skip(tctx, "Skip backupkey test with MIT Kerberos");
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
struct torture_suite *torture_rpc_backupkey(TALLOC_CTX *mem_ctx)
|
||||
{
|
||||
struct torture_rpc_tcase *tcase;
|
||||
struct torture_suite *suite = torture_suite_create(mem_ctx, "backupkey");
|
||||
|
||||
#ifdef SAMBA4_USES_HEIMDAL
|
||||
struct torture_rpc_tcase *tcase;
|
||||
|
||||
tcase = torture_suite_add_rpc_iface_tcase(suite, "backupkey",
|
||||
&ndr_table_backupkey);
|
||||
|
||||
@ -2126,6 +2140,14 @@ struct torture_suite *torture_rpc_backupkey(TALLOC_CTX *mem_ctx)
|
||||
|
||||
torture_rpc_tcase_add_test(tcase, "server_wrap_encrypt_decrypt_wrong_sid",
|
||||
test_ServerWrap_encrypt_decrypt_wrong_sid);
|
||||
#else
|
||||
struct torture_tcase *tcase;
|
||||
|
||||
tcase = torture_suite_add_tcase(suite, "backupkey");
|
||||
|
||||
torture_tcase_add_simple_test(tcase, "skip",
|
||||
test_skip);
|
||||
#endif
|
||||
|
||||
return suite;
|
||||
}
|
||||
|
@ -540,9 +540,7 @@ NTSTATUS torture_rpc_init(void)
|
||||
torture_suite_add_simple_test(suite, "asyncbind", torture_async_bind);
|
||||
torture_suite_add_suite(suite, torture_rpc_ntsvcs(suite));
|
||||
torture_suite_add_suite(suite, torture_rpc_bind(suite));
|
||||
#ifdef AD_DC_BUILD_IS_ENABLED /* Add Heimdal-specific KDC test */
|
||||
torture_suite_add_suite(suite, torture_rpc_backupkey(suite));
|
||||
#endif
|
||||
torture_suite_add_suite(suite, torture_rpc_fsrvp(suite));
|
||||
torture_suite_add_suite(suite, torture_rpc_clusapi(suite));
|
||||
torture_suite_add_suite(suite, torture_rpc_witness(suite));
|
||||
|
@ -32,12 +32,11 @@ bld.RECURSE('winbind')
|
||||
bld.RECURSE('libnetapi')
|
||||
bld.RECURSE('libsmbclient')
|
||||
|
||||
heimdal_specific = dict()
|
||||
heimdal_specific['ndr'] = ('','')
|
||||
heimdal_specific['rpc'] = ('','')
|
||||
heimdal_specific = dict(source='', deps='')
|
||||
|
||||
if bld.CONFIG_SET('AD_DC_BUILD_IS_ENABLED'):
|
||||
heimdal_specific['rpc'] = (' rpc/backupkey.c rpc/spoolss_notify.c',
|
||||
' RPC_NDR_BACKUPKEY SMB_SERVER dcerpc_server ntvfs')
|
||||
heimdal_specific['source'] += ' rpc/spoolss_notify.c'
|
||||
heimdal_specific['deps'] += ' SMB_SERVER dcerpc_server ntvfs'
|
||||
|
||||
bld.SAMBA_SUBSYSTEM('TORTURE_NDR',
|
||||
source='ndr/ndr.c ndr/winreg.c ndr/atsvc.c ndr/lsa.c ndr/epmap.c ndr/dfs.c ndr/netlogon.c ndr/drsuapi.c ndr/spoolss.c ndr/ntprinting.c ndr/samr.c ndr/dfsblob.c ndr/drsblobs.c ndr/nbt.c ndr/ntlmssp.c ndr/string.c ndr/backupkey.c ndr/witness.c',
|
||||
@ -61,7 +60,6 @@ bld.SAMBA_MODULE('torture_rpc',
|
||||
rpc/spoolss.c
|
||||
rpc/spoolss_win.c
|
||||
rpc/spoolss_access.c
|
||||
rpc/spoolss_notify.c
|
||||
rpc/unixinfo.c
|
||||
rpc/samr.c
|
||||
rpc/samr_accessmask.c
|
||||
@ -100,7 +98,9 @@ bld.SAMBA_MODULE('torture_rpc',
|
||||
rpc/bind.c
|
||||
rpc/fsrvp.c
|
||||
rpc/clusapi.c
|
||||
rpc/witness.c''' + heimdal_specific['rpc'][0],
|
||||
rpc/witness.c
|
||||
rpc/backupkey.c
|
||||
''' + heimdal_specific['source'],
|
||||
autoproto='rpc/proto.h',
|
||||
subsystem='smbtorture',
|
||||
init_function='torture_rpc_init',
|
||||
@ -145,7 +145,8 @@ bld.SAMBA_MODULE('torture_rpc',
|
||||
RPC_NDR_FSRVP
|
||||
RPC_NDR_CLUSAPI
|
||||
RPC_NDR_WITNESS
|
||||
''' + heimdal_specific['rpc'][1],
|
||||
RPC_NDR_BACKUPKEY
|
||||
''' + heimdal_specific['deps'],
|
||||
internal_module=True)
|
||||
|
||||
bld.RECURSE('drs')
|
||||
|
Loading…
Reference in New Issue
Block a user