diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-09-02 17:27:40 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:03:34 -0500 |
commit | c0091046263d9568a379f8ed9afd4a08f86b6c84 (patch) | |
tree | 7f669666e32a190560fcdd77a76b4181c6a5a03c /source4/torture/rpc/alter_context.c | |
parent | c7e8bcfdc980579cd626be9cc4be040df5a7c7c1 (diff) | |
download | samba-c0091046263d9568a379f8ed9afd4a08f86b6c84.tar.gz samba-c0091046263d9568a379f8ed9afd4a08f86b6c84.tar.bz2 samba-c0091046263d9568a379f8ed9afd4a08f86b6c84.zip |
r24900: - if we use try to create a 3rd dcerpc_pipe then use a 3rd variable
instead of overwritting the one of the 2nd connection
- make it possible to specify the expected ntstatus for
DsRoleGetPrimaryDomainInformation as the alter_context
wants it to fail when used on the wrong pipe
metze
(This used to be commit c7c72ab36b15c5ffac1740b7df93fa92fe4620e9)
Diffstat (limited to 'source4/torture/rpc/alter_context.c')
-rw-r--r-- | source4/torture/rpc/alter_context.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/source4/torture/rpc/alter_context.c b/source4/torture/rpc/alter_context.c index f5e8282344..7843713074 100644 --- a/source4/torture/rpc/alter_context.c +++ b/source4/torture/rpc/alter_context.c @@ -28,8 +28,8 @@ bool torture_rpc_alter_context(struct torture_context *torture) { - NTSTATUS status; - struct dcerpc_pipe *p, *p2; + NTSTATUS status; + struct dcerpc_pipe *p, *p2, *p3; struct policy_handle *handle; struct ndr_interface_table tmptbl; struct ndr_syntax_id syntax; @@ -51,7 +51,7 @@ bool torture_rpc_alter_context(struct torture_context *torture) tmptbl = ndr_table_dssetup; tmptbl.syntax_id.if_version += 100; torture_comment(torture, "Opening bad secondary connection\n"); - status = dcerpc_secondary_context(p, &p2, &tmptbl); + status = dcerpc_secondary_context(p, &p3, &tmptbl); torture_assert_ntstatus_equal(torture, status, NT_STATUS_RPC_UNSUPPORTED_NAME_SYNTAX, "dcerpc_alter_context with wrong version should fail"); @@ -59,9 +59,7 @@ bool torture_rpc_alter_context(struct torture_context *torture) ret &= test_DsRoleGetPrimaryDomainInformation(torture, p2); if (handle) { - if (!test_lsa_Close(p, torture, handle)) { - ret = false; - } + ret &= test_lsa_Close(p, torture, handle); } syntax = p->syntax; @@ -72,18 +70,12 @@ bool torture_rpc_alter_context(struct torture_context *torture) torture_assert_ntstatus_ok(torture, status, "dcerpc_alter_context failed"); torture_comment(torture, "testing DSSETUP pipe operations - should fault\n"); - if (test_DsRoleGetPrimaryDomainInformation(torture, p)) { - ret = false; - } + ret &= test_DsRoleGetPrimaryDomainInformation_ext(torture, p, NT_STATUS_NET_WRITE_FAULT); - if (!test_lsa_OpenPolicy2(p, torture, &handle)) { - ret = false; - } + ret &= test_lsa_OpenPolicy2(p, torture, &handle); if (handle) { - if (!test_lsa_Close(p, torture, handle)) { - ret = false; - } + ret &= test_lsa_Close(p, torture, handle); } torture_comment(torture, "testing DSSETUP pipe operations\n"); |