mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s4:torture/rpc: avoid checking p->last_fault_code in iremotewinspool*
Now that we check for NT_STATUS_RPC_UNSUPPORTED_TYPE, there's no need to check for DCERPC_NCA_S_UNSUPPORTED_TYPE. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
492f6a0eef
commit
b0be3c8af8
@ -824,8 +824,7 @@ static bool test_OpenPrinter(struct torture_context *tctx,
|
||||
|
||||
static bool test_object_one_uuid(struct torture_context *tctx,
|
||||
const struct GUID *object_uuid,
|
||||
NTSTATUS expected_status,
|
||||
uint32_t expected_fault_code)
|
||||
NTSTATUS expected_status)
|
||||
{
|
||||
const char *printer_name;
|
||||
struct spoolss_UserLevel1 client_info;
|
||||
@ -865,7 +864,6 @@ static bool test_object_one_uuid(struct torture_context *tctx,
|
||||
client_info,
|
||||
expected_status,
|
||||
WERR_OK,
|
||||
expected_fault_code,
|
||||
&server_handle),
|
||||
"failed to open printserver");
|
||||
if (NT_STATUS_IS_OK(expected_status)) {
|
||||
@ -884,41 +882,35 @@ static bool test_object_uuid(struct torture_context *tctx,
|
||||
|
||||
torture_assert(tctx,
|
||||
test_object_one_uuid(tctx, NULL,
|
||||
NT_STATUS_RPC_UNSUPPORTED_TYPE,
|
||||
DCERPC_NCA_S_UNSUPPORTED_TYPE),
|
||||
NT_STATUS_RPC_UNSUPPORTED_TYPE),
|
||||
"failed to test NULL object uuid");
|
||||
|
||||
object_uuid = GUID_zero();
|
||||
torture_assert(tctx,
|
||||
test_object_one_uuid(tctx, &object_uuid,
|
||||
NT_STATUS_RPC_UNSUPPORTED_TYPE,
|
||||
DCERPC_NCA_S_UNSUPPORTED_TYPE),
|
||||
NT_STATUS_RPC_UNSUPPORTED_TYPE),
|
||||
"failed to test zeroed object uuid");
|
||||
|
||||
object_uuid = GUID_random();
|
||||
torture_assert(tctx,
|
||||
test_object_one_uuid(tctx, &object_uuid,
|
||||
NT_STATUS_RPC_UNSUPPORTED_TYPE,
|
||||
DCERPC_NCA_S_UNSUPPORTED_TYPE),
|
||||
NT_STATUS_RPC_UNSUPPORTED_TYPE),
|
||||
"failed to test random object uuid");
|
||||
|
||||
GUID_from_string(IREMOTEWINSPOOL_OBJECT_GUID, &object_uuid);
|
||||
torture_assert(tctx,
|
||||
test_object_one_uuid(tctx, &object_uuid,
|
||||
NT_STATUS_OK,
|
||||
0),
|
||||
NT_STATUS_OK),
|
||||
"failed to test IREMOTEWINSPOOL_OBJECT_GUID");
|
||||
|
||||
torture_assert(tctx,
|
||||
test_object_one_uuid(tctx, &ndr_table_spoolss.syntax_id.uuid,
|
||||
NT_STATUS_RPC_UNSUPPORTED_TYPE,
|
||||
DCERPC_NCA_S_UNSUPPORTED_TYPE),
|
||||
NT_STATUS_RPC_UNSUPPORTED_TYPE),
|
||||
"failed to test spoolss interface uuid");
|
||||
|
||||
torture_assert(tctx,
|
||||
test_object_one_uuid(tctx, &ndr_table_iremotewinspool.syntax_id.uuid,
|
||||
NT_STATUS_RPC_UNSUPPORTED_TYPE,
|
||||
DCERPC_NCA_S_UNSUPPORTED_TYPE),
|
||||
NT_STATUS_RPC_UNSUPPORTED_TYPE),
|
||||
"failed to test iremotewinspool interface uuid");
|
||||
|
||||
return true;
|
||||
|
@ -59,7 +59,6 @@ bool test_AsyncOpenPrinter_byprinter_expect(struct torture_context *tctx,
|
||||
struct spoolss_UserLevel1 cinfo,
|
||||
NTSTATUS expected_status,
|
||||
WERROR expected_result,
|
||||
uint32_t expected_fault_code,
|
||||
struct policy_handle *handle)
|
||||
{
|
||||
struct dcerpc_binding_handle *b = p->binding_handle;
|
||||
@ -86,8 +85,6 @@ bool test_AsyncOpenPrinter_byprinter_expect(struct torture_context *tctx,
|
||||
torture_assert_ntstatus_equal(tctx, status, expected_status, "AsyncOpenPrinter failed");
|
||||
torture_assert_werr_equal(tctx, r.out.result, expected_result,
|
||||
"AsyncOpenPrinter failed");
|
||||
torture_assert_u32_equal(tctx, p->last_fault_code, expected_fault_code,
|
||||
"unexpected DCERPC fault code");
|
||||
|
||||
return ok;
|
||||
}
|
||||
@ -107,7 +104,6 @@ bool test_AsyncOpenPrinter_byprinter(struct torture_context *tctx,
|
||||
cinfo,
|
||||
NT_STATUS_OK,
|
||||
WERR_OK,
|
||||
0,
|
||||
handle);
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,6 @@ bool test_AsyncOpenPrinter_byprinter_expect(struct torture_context *tctx,
|
||||
struct spoolss_UserLevel1 cinfo,
|
||||
NTSTATUS exected_status,
|
||||
WERROR exected_result,
|
||||
uint32_t expected_fault_code,
|
||||
struct policy_handle *handle);
|
||||
bool test_get_environment(struct torture_context *tctx,
|
||||
struct dcerpc_binding_handle *b,
|
||||
|
Loading…
Reference in New Issue
Block a user