From 74a1ed3e28b92836bf72a658aefd7b8ad59792cd Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 8 Jan 2009 17:28:20 +0100 Subject: s4-smbtorture: extend test_QueryServiceConfig2W a bit. Guenther --- source4/torture/rpc/svcctl.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'source4') diff --git a/source4/torture/rpc/svcctl.c b/source4/torture/rpc/svcctl.c index 7d8fc6b332..ea1534069c 100644 --- a/source4/torture/rpc/svcctl.c +++ b/source4/torture/rpc/svcctl.c @@ -157,6 +157,24 @@ static bool test_QueryServiceConfig2W(struct torture_context *tctx, struct dcerp torture_assert_werr_ok(tctx, r.out.result, "QueryServiceConfig2W failed!"); } + r.in.info_level = SERVICE_CONFIG_FAILURE_ACTIONS; + r.in.buf_size = buf_size; + r.out.buffer = buffer; + r.out.bytes_needed = &bytes_needed; + + status = dcerpc_svcctl_QueryServiceConfig2W(p, tctx, &r); + torture_assert_ntstatus_ok(tctx, status, "QueryServiceConfig2W failed!"); + + if (W_ERROR_EQUAL(r.out.result, WERR_INSUFFICIENT_BUFFER)) { + r.in.buf_size = bytes_needed; + buffer = talloc_array(tctx, uint8_t, bytes_needed); + r.out.buffer = buffer; + + status = dcerpc_svcctl_QueryServiceConfig2W(p, tctx, &r); + torture_assert_ntstatus_ok(tctx, status, "QueryServiceConfig2W failed!"); + torture_assert_werr_ok(tctx, r.out.result, "QueryServiceConfig2W failed!"); + } + if (!test_CloseServiceHandle(p, tctx, &s)) return false; -- cgit