From 2e4466344ab501ebc14c730ef90d41d7c1eee159 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 31 Dec 2004 22:12:44 +0000 Subject: r4457: Fix IDL + add torture test for InqObject (This used to be commit dbcaff7c71c9b7ee984a2ed458b6c3ce27772740) --- source4/torture/rpc/epmapper.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'source4/torture') diff --git a/source4/torture/rpc/epmapper.c b/source4/torture/rpc/epmapper.c index c3a847684f..68a6f6ba62 100644 --- a/source4/torture/rpc/epmapper.c +++ b/source4/torture/rpc/epmapper.c @@ -263,6 +263,23 @@ static BOOL test_Lookup(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) return True; } +static BOOL test_InqObject(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) +{ + NTSTATUS status; + struct epm_InqObject r; + + r.in.epm_object = talloc_p(mem_ctx, struct GUID); + GUID_from_string(DCERPC_EPMAPPER_UUID, r.in.epm_object); + + status = dcerpc_epm_InqObject(p, mem_ctx, &r); + if (NT_STATUS_IS_ERR(status)) { + printf("InqObject failed - %s\n", nt_errstr(status)); + return False; + } + + return True; +} + BOOL torture_rpc_epmapper(void) { NTSTATUS status; @@ -284,9 +301,13 @@ BOOL torture_rpc_epmapper(void) ret = False; } + if (!test_InqObject(p, mem_ctx)) { + ret = False; + } + talloc_destroy(mem_ctx); - torture_rpc_close(p); + torture_rpc_close(p); return ret; } -- cgit