diff options
author | Günther Deschner <gd@samba.org> | 2009-01-08 17:28:20 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-01-08 17:32:44 +0100 |
commit | 74a1ed3e28b92836bf72a658aefd7b8ad59792cd (patch) | |
tree | 2816bc61f252f81b07eeb668a70818564ed06155 /source4/torture/rpc | |
parent | e0edc079bdb8c73a42af38f99726470366ff0527 (diff) | |
download | samba-74a1ed3e28b92836bf72a658aefd7b8ad59792cd.tar.gz samba-74a1ed3e28b92836bf72a658aefd7b8ad59792cd.tar.bz2 samba-74a1ed3e28b92836bf72a658aefd7b8ad59792cd.zip |
s4-smbtorture: extend test_QueryServiceConfig2W a bit.
Guenther
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r-- | source4/torture/rpc/svcctl.c | 18 |
1 files changed, 18 insertions, 0 deletions
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; |