diff options
author | Günther Deschner <gd@samba.org> | 2010-03-24 13:34:01 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-03-24 13:34:01 +0100 |
commit | fcad13500bee1305784df6de0f553372b2948a74 (patch) | |
tree | 41b6d8b80b3d36f23e01d6f64007f57e64b98ea9 | |
parent | 8cd63a854e465bba030436038e4644f694f2801a (diff) | |
download | samba-fcad13500bee1305784df6de0f553372b2948a74.tar.gz samba-fcad13500bee1305784df6de0f553372b2948a74.tar.bz2 samba-fcad13500bee1305784df6de0f553372b2948a74.zip |
s4-smbtorture: add missing checks for WERROR results in RPC-SAMBA3 tests.
Guenther
-rw-r--r-- | source4/torture/rpc/samba3rpc.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c index 4de8f6778c..9ff59e74ce 100644 --- a/source4/torture/rpc/samba3rpc.c +++ b/source4/torture/rpc/samba3rpc.c @@ -2166,6 +2166,12 @@ static struct security_descriptor *get_sharesec(struct torture_context *tctx, talloc_free(tmp_ctx); return NULL; } + if (!W_ERROR_IS_OK(r.out.result)) { + torture_comment(tctx, "srvsvc_NetShareGetInfo failed: %s\n", + win_errstr(r.out.result)); + talloc_free(tmp_ctx); + return NULL; + } result = talloc_steal(mem_ctx, info.info502->sd_buf.sd); talloc_free(tmp_ctx); @@ -2227,7 +2233,11 @@ static NTSTATUS set_sharesec(struct torture_context *tctx, torture_comment(tctx, "srvsvc_NetShareSetInfo failed: %s\n", nt_errstr(status)); } - + if (!W_ERROR_IS_OK(r.out.result)) { + torture_comment(tctx, "srvsvc_NetShareSetInfo failed: %s\n", + win_errstr(r.out.result)); + status = werror_to_ntstatus(r.out.result); + } talloc_free(tmp_ctx); return status; } @@ -2490,6 +2500,8 @@ static bool find_printers(struct torture_context *tctx, torture_assert_ntstatus_ok(tctx, dcerpc_srvsvc_NetShareEnum_r(b, tctx, &r), "NetShareEnum level 1 failed"); + torture_assert_werr_ok(tctx, r.out.result, + "NetShareEnum level 1 failed"); *printers = NULL; *num_printers = 0; @@ -2766,6 +2778,8 @@ static bool torture_samba3_rpc_wkssvc(struct torture_context *torture) torture_assert_ntstatus_ok(torture, dcerpc_wkssvc_NetWkstaGetInfo_r(b, torture, &r), "dcerpc_wkssvc_NetWksGetInfo failed"); + torture_assert_werr_ok(torture, r.out.result, + "dcerpc_wkssvc_NetWksGetInfo failed"); torture_assert_str_equal(torture, servername, r.out.info->info100->server_name, "servername RAP / DCERPC inconsistency"); @@ -2903,6 +2917,8 @@ static bool test_Open3(struct torture_context *tctx, torture_assert_ntstatus_ok(tctx, open_fn(b, tctx, &r), talloc_asprintf(tctx, "%s failed", name)); + torture_assert_werr_ok(tctx, r.out.result, + talloc_asprintf(tctx, "%s failed", name)); enumkeys(tctx, b, &handle, 4); |