diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-02-01 13:04:48 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-02-02 12:43:32 +0100 |
commit | eca7292aeca5de494a39fff67f719d8e9c34aaf6 (patch) | |
tree | 4812906d480891e1cba34ac4d89619418b56448a | |
parent | 1f9caef3622097965525fcbc5bf98e17228330e7 (diff) | |
download | samba-eca7292aeca5de494a39fff67f719d8e9c34aaf6.tar.gz samba-eca7292aeca5de494a39fff67f719d8e9c34aaf6.tar.bz2 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
-rw-r--r-- | source4/torture/rpc/netlogon.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c index b7c9b05d1d..14052e7a0b 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; } |