r4457: Fix IDL + add torture test for InqObject
authorJelmer Vernooij <jelmer@samba.org>
Fri, 31 Dec 2004 22:12:44 +0000 (22:12 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:07:52 +0000 (13:07 -0500)
source/librpc/idl/epmapper.idl
source/torture/rpc/epmapper.c

index e18c24a3cd11218ff79ad81856e86958e83860ec..e32b01a874655f90316ee96ca8c7223fc5f7761c 100644 (file)
@@ -297,7 +297,7 @@ interface epmapper
        /**********************/
        /* Function 0x05      */
        error_status_t epm_InqObject(
-               [out]           GUID        *epm_object
+               [in,ref]    GUID        *epm_object
                );
     
 
index c3a847684f50af0fe4d71cd57998f96cc19410e3..68a6f6ba62998981d03070f4d75b8c4d277f2c30 100644 (file)
@@ -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;
 }