summaryrefslogtreecommitdiffstats
path: root/source4/torture
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-02-01 13:04:48 +0100
committerStefan Metzmacher <metze@samba.org>2011-02-02 12:43:32 +0100
commiteca7292aeca5de494a39fff67f719d8e9c34aaf6 (patch)
tree4812906d480891e1cba34ac4d89619418b56448a /source4/torture
parent1f9caef3622097965525fcbc5bf98e17228330e7 (diff)
downloadsamba-eca7292aeca5de494a39fff67f719d8e9c34aaf6.tar.gz
samba-eca7292aeca5de494a39fff67f719d8e9c34aaf6.tar.xz
samba-eca7292aeca5de494a39fff67f719d8e9c34aaf6.zip
s4:torture/rpc/netlogon: add invalid level tests for netr_LogonControl2
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Feb 2 12:43:32 CET 2011 on sn-devel-104
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/netlogon.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index b7c9b05d1d3..14052e7a0b5 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -1999,6 +1999,30 @@ static bool test_LogonControl2(struct torture_context *tctx,
torture_assert_ntstatus_ok(tctx, status, "LogonControl2");
}
+ ZERO_STRUCT(data);
+ r.in.function_code = 52;
+ r.in.data = &data;
+
+ torture_comment(tctx, "Testing LogonControl2 function code %s (%d) level %d\n",
+ function_code_str(tctx, r.in.function_code), r.in.function_code, r.in.level);
+
+ status = dcerpc_netr_LogonControl2_r(b, tctx, &r);
+ torture_assert_ntstatus_ok(tctx, status, "LogonControl2");
+ torture_assert_werr_equal(tctx, r.out.result, WERR_UNKNOWN_LEVEL, "LogonControl2");
+
+ data.debug_level = ~0;
+
+ r.in.function_code = NETLOGON_CONTROL_SET_DBFLAG;
+ r.in.data = &data;
+
+ r.in.level = 52;
+ torture_comment(tctx, "Testing LogonControl2 function code %s (%d) level %d\n",
+ function_code_str(tctx, r.in.function_code), r.in.function_code, r.in.level);
+
+ status = dcerpc_netr_LogonControl2_r(b, tctx, &r);
+ torture_assert_ntstatus_ok(tctx, status, "LogonControl2");
+ torture_assert_werr_equal(tctx, r.out.result, WERR_UNKNOWN_LEVEL, "LogonControl2");
+
return true;
}