From aaf1c751f4cf447d80ef9dae341ef3247c1607e2 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Tue, 27 Apr 2010 15:58:45 +0200 Subject: s4:torture/rpc/netlogon.c - add another "LogonGetDomainInfo" testcase Mark it as dangerous since it does break some target systems. --- source4/torture/rpc/netlogon.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'source4/torture/rpc') diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c index 96ae4c0dfe..b1d6d1b557 100644 --- a/source4/torture/rpc/netlogon.c +++ b/source4/torture/rpc/netlogon.c @@ -3150,6 +3150,23 @@ static bool test_GetDomainInfo(struct torture_context *tctx, && (info.domain_info->trusted_domains != NULL), "Trusted domains have been requested!"); + + if (!torture_setting_bool(tctx, "dangerous", false)) { + torture_comment(tctx, "Not testing netr_LogonGetDomainInfo 6th call (no workstation info) - enable dangerous tests in order to do so\n"); + } else { + /* Try a call without the workstation information structure */ + + torture_comment(tctx, "Testing netr_LogonGetDomainInfo 6th call (no workstation info)\n"); + netlogon_creds_client_authenticator(creds, &a); + + query.workstation_info = NULL; + + torture_assert_ntstatus_ok(tctx, dcerpc_netr_LogonGetDomainInfo_r(b, tctx, &r), + "LogonGetDomainInfo failed"); + torture_assert_ntstatus_ok(tctx, r.out.result, "LogonGetDomainInfo failed"); + torture_assert(tctx, netlogon_creds_client_check(creds, &a.cred), "Credential chaining failed"); + } + return true; } -- cgit