summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-07-19 06:14:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:57:41 -0500
commitb56fbe6d143d01d52e4029b45693d0b9ab7781c9 (patch)
treeb180a5152232da6ba4e0496d855c8e098013da38
parentce0f008a698087699dca65d739e3322aea561a81 (diff)
downloadsamba-b56fbe6d143d01d52e4029b45693d0b9ab7781c9.tar.gz
samba-b56fbe6d143d01d52e4029b45693d0b9ab7781c9.tar.bz2
samba-b56fbe6d143d01d52e4029b45693d0b9ab7781c9.zip
r1543: add srvsvc_NetRemoteTOD idl and torture tests
metze (This used to be commit 3f2b77d7ec024f54dc478522d85278ced8fce617)
-rw-r--r--source4/librpc/idl/srvsvc.idl22
-rw-r--r--source4/torture/rpc/srvsvc.c30
2 files changed, 51 insertions, 1 deletions
diff --git a/source4/librpc/idl/srvsvc.idl b/source4/librpc/idl/srvsvc.idl
index 2f1a85be50..16827bb324 100644
--- a/source4/librpc/idl/srvsvc.idl
+++ b/source4/librpc/idl/srvsvc.idl
@@ -1119,9 +1119,29 @@
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
);
/**************************/
diff --git a/source4/torture/rpc/srvsvc.c b/source4/torture/rpc/srvsvc.c
index daa4e96386..91ceebdc28 100644
--- a/source4/torture/rpc/srvsvc.c
+++ b/source4/torture/rpc/srvsvc.c
@@ -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;
}