r1543: add srvsvc_NetRemoteTOD idl and torture tests
authorStefan Metzmacher <metze@samba.org>
Mon, 19 Jul 2004 06:14:00 +0000 (06:14 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:57:41 +0000 (12:57 -0500)
metze

source/librpc/idl/srvsvc.idl
source/torture/rpc/srvsvc.c

index 2f1a85be50de748131eabb469eb0f37c689ea230..16827bb3242e6fb6d5acae47f9deafd3736ed442 100644 (file)
        WERROR srvsvc_NETRSERVERTRANSPORTDEL(
                );
 
+/**************************/
+/* srvsvc_NetRemoteTOD    */
+/**************************/
+       typedef struct {
+               uint32 elapsed;
+               uint32 msecs;
+               uint32 hours;
+               uint32 mins;
+               uint32 secs;
+               uint32 hunds;
+               uint32 timezone;
+               uint32 tinterval;
+               uint32 day;
+               uint32 month;
+               uint32 year;
+               uint32 weekday;
+       } srvsvc_NetRemoteTODInfo;
+
        /******************/
        /* Function: 0x1c */
-       WERROR srvsvc_NET_REMOTE_TOD(
+       WERROR srvsvc_NetRemoteTOD(
+               [in]   unistr *server_unc,
+               [out]   srvsvc_NetRemoteTODInfo *info
                );
 
 /**************************/
index daa4e963866627711607f6b17c8424a60b5fca9a..91ceebdc284f640d6effbe8b67b52e3fe9380895 100644 (file)
@@ -642,6 +642,32 @@ static BOOL test_NetTransportEnum(struct dcerpc_pipe *p,
        return ret;
 }
 
+/**************************/
+/* srvsvc_NetRemoteTOD    */
+/**************************/
+static BOOL test_NetRemoteTOD(struct dcerpc_pipe *p, 
+                          TALLOC_CTX *mem_ctx)
+{
+       NTSTATUS status;
+       struct srvsvc_NetRemoteTOD r;
+       BOOL ret = True;
+
+       r.in.server_unc = talloc_asprintf(mem_ctx,"\\\\%s",dcerpc_server_name(p));
+
+       ZERO_STRUCT(r.out);
+       printf("testing NetRemoteTOD\n");
+       status = dcerpc_srvsvc_NetRemoteTOD(p, mem_ctx, &r);
+       if (!NT_STATUS_IS_OK(status)) {
+               printf("NetRemoteTOD failed - %s\n", nt_errstr(status));
+               ret = False;
+       }
+       if (!W_ERROR_IS_OK(r.out.result)) {
+               printf("NetRemoteTOD failed - %s\n", win_errstr(r.out.result));
+       }
+
+       return ret;
+}
+
 BOOL torture_rpc_srvsvc(int dummy)
 {
         NTSTATUS status;
@@ -695,6 +721,10 @@ BOOL torture_rpc_srvsvc(int dummy)
                ret = False;
        }
 
+       if (!test_NetRemoteTOD(p, mem_ctx)) {
+               ret = False;
+       }
+
        if (!test_NetShareEnum(p, mem_ctx)) {
                ret = False;
        }