1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

s4-torture: Added test_LookupHandleFree.

This commit is contained in:
Andreas Schneider 2010-12-23 13:07:39 +01:00 committed by Günther Deschner
parent 9a771f17c8
commit 0ccb374c6a

View File

@ -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)
{