s4:torture/rpc/netlogon.c - add another "LogonGetDomainInfo" testcase
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Tue, 27 Apr 2010 13:58:45 +0000 (15:58 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Mon, 31 May 2010 10:08:32 +0000 (12:08 +0200)
Mark it as dangerous since it does break some target systems.

source4/torture/rpc/netlogon.c

index 96ae4c0dfe442c795ee25781924929b53b855686..b1d6d1b5572d76e92cfecdac4e7b36fce5454ce5 100644 (file)
@@ -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;
 }