summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2010-12-23 13:07:39 +0100
committerGünther Deschner <gd@samba.org>2011-01-27 14:41:40 +0100
commit0ccb374c6a72100560417326538b0642ad6feb18 (patch)
tree8719aec416b2d665d6b146a973f9e6560e3f9104 /source4/torture/rpc
parent9a771f17c84d8dbe8cbb1fdb86631a1fc7c9899b (diff)
downloadsamba-0ccb374c6a72100560417326538b0642ad6feb18.tar.gz
samba-0ccb374c6a72100560417326538b0642ad6feb18.tar.bz2
samba-0ccb374c6a72100560417326538b0642ad6feb18.zip
s4-torture: Added test_LookupHandleFree.
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/epmapper.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/source4/torture/rpc/epmapper.c b/source4/torture/rpc/epmapper.c
index cb8fd8c351..c466add851 100644
--- a/source4/torture/rpc/epmapper.c
+++ b/source4/torture/rpc/epmapper.c
@@ -135,6 +135,43 @@ static bool test_Map(struct dcerpc_binding_handle *b,
return true;
}
+static bool test_LookupHandleFree(struct torture_context *tctx,
+ struct dcerpc_binding_handle *h,
+ struct policy_handle *entry_handle) {
+ NTSTATUS status;
+ struct epm_LookupHandleFree r;
+
+ if (torture_setting_bool(tctx, "samba4", false)) {
+ torture_skip(tctx, "Skip Insert test against Samba4");
+ }
+
+ if (policy_handle_empty(entry_handle)) {
+ torture_comment(tctx,
+ "epm_LookupHandleFree failed - empty policy_handle\n");
+ return false;
+ }
+
+ r.in.entry_handle = entry_handle;
+
+ status = dcerpc_epm_LookupHandleFree_r(h, tctx, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ torture_comment(tctx,
+ "epm_LookupHandleFree failed - %s\n",
+ nt_errstr(status));
+ return false;
+ }
+
+ if (r.out.result != EPMAPPER_STATUS_OK) {
+ torture_comment(tctx,
+ "epm_LookupHandleFree failed - internal error: "
+ "0x%.4x\n",
+ r.out.result);
+ return false;
+ }
+
+ return true;
+}
+
static bool test_Lookup(struct torture_context *tctx,
struct dcerpc_pipe *p)
{