summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-12-31 22:12:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:07:52 -0500
commit2e4466344ab501ebc14c730ef90d41d7c1eee159 (patch)
tree2c48980bcdfc91def4a537fcdbcc94ef7fbf0ad9 /source4/torture
parent05720e4c1723eb3822f29d9d088910f0ba93163d (diff)
downloadsamba-2e4466344ab501ebc14c730ef90d41d7c1eee159.tar.gz
samba-2e4466344ab501ebc14c730ef90d41d7c1eee159.tar.bz2
samba-2e4466344ab501ebc14c730ef90d41d7c1eee159.zip
r4457: Fix IDL + add torture test for InqObject
(This used to be commit dbcaff7c71c9b7ee984a2ed458b6c3ce27772740)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/epmapper.c23
1 files changed, 22 insertions, 1 deletions
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;
}