summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/librpc/idl/wkssvc.idl51
-rw-r--r--source4/rpc_server/wkssvc/dcesrv_wkssvc.c8
-rw-r--r--source4/torture/rpc/wkssvc.c27
3 files changed, 81 insertions, 5 deletions
diff --git a/source4/librpc/idl/wkssvc.idl b/source4/librpc/idl/wkssvc.idl
index 6ecceae3e1..918694f011 100644
--- a/source4/librpc/idl/wkssvc.idl
+++ b/source4/librpc/idl/wkssvc.idl
@@ -376,7 +376,56 @@ import "srvsvc.idl", "lsa.idl";
/*****************************/
/* Function 0x0d */
- WERROR WKSSVC_NETRWORKSTATIONSTATISTICSGET ();
+ typedef struct {
+ hyper unknown1;
+ hyper unknown2;
+ hyper unknown3;
+ hyper unknown4;
+ hyper unknown5;
+ hyper unknown6;
+ hyper unknown7;
+ hyper unknown8;
+ hyper unknown9;
+ hyper unknown10;
+ hyper unknown11;
+ hyper unknown12;
+ hyper unknown13;
+ uint32 unknown14;
+ uint32 unknown15;
+ uint32 unknown16;
+ uint32 unknown17;
+ uint32 unknown18;
+ uint32 unknown19;
+ uint32 unknown20;
+ uint32 unknown21;
+ uint32 unknown22;
+ uint32 unknown23;
+ uint32 unknown24;
+ uint32 unknown25;
+ uint32 unknown26;
+ uint32 unknown27;
+ uint32 unknown28;
+ uint32 unknown29;
+ uint32 unknown30;
+ uint32 unknown31;
+ uint32 unknown32;
+ uint32 unknown33;
+ uint32 unknown34;
+ uint32 unknown35;
+ uint32 unknown36;
+ uint32 unknown37;
+ uint32 unknown38;
+ uint32 unknown39;
+ uint32 unknown40;
+ } wkssvc_NetrWorkstationStatistics;
+
+ WERROR wkssvc_NetrWorkstationStatisticsGet(
+ [in] [string,charset(UTF16)] uint16 *server_name,
+ [in] [string,charset(UTF16)] uint16 *unknown2,
+ [in] uint32 unknown3,
+ [in] uint32 unknown4,
+ [out] [ref] wkssvc_NetrWorkstationStatistics **info
+ );
/*****************************/
/* Function 0x0e */
diff --git a/source4/rpc_server/wkssvc/dcesrv_wkssvc.c b/source4/rpc_server/wkssvc/dcesrv_wkssvc.c
index b48dbaf414..5d2a88dcfd 100644
--- a/source4/rpc_server/wkssvc/dcesrv_wkssvc.c
+++ b/source4/rpc_server/wkssvc/dcesrv_wkssvc.c
@@ -232,11 +232,11 @@ static WERROR dcesrv_WKSSVC_NETRMESSAGEBUFFERSEND(struct dcesrv_call_state *dce_
}
-/*
- WKSSVC_NETRWORKSTATIONSTATISTICSGET
+/*
+ wkssvc_NetrWorkstationStatisticsGet
*/
-static WERROR dcesrv_WKSSVC_NETRWORKSTATIONSTATISTICSGET(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct WKSSVC_NETRWORKSTATIONSTATISTICSGET *r)
+static WERROR dcesrv_wkssvc_NetrWorkstationStatisticsGet(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct wkssvc_NetrWorkstationStatisticsGet *r)
{
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
diff --git a/source4/torture/rpc/wkssvc.c b/source4/torture/rpc/wkssvc.c
index 215ea7546e..f4141ce32b 100644
--- a/source4/torture/rpc/wkssvc.c
+++ b/source4/torture/rpc/wkssvc.c
@@ -716,6 +716,30 @@ static bool test_NetrRemoveAlternateComputerName(struct torture_context *tctx,
return true;
}
+static bool test_NetrWorkstationStatisticsGet(struct torture_context *tctx,
+ struct dcerpc_pipe *p)
+{
+ NTSTATUS status;
+ struct wkssvc_NetrWorkstationStatisticsGet r;
+ struct wkssvc_NetrWorkstationStatistics *info;
+
+ ZERO_STRUCT(r);
+
+ info = talloc_zero(tctx, struct wkssvc_NetrWorkstationStatistics);
+
+ r.in.server_name = dcerpc_server_name(p);
+ r.out.info = &info;
+
+ torture_comment(tctx, "testing NetrWorkstationStatisticsGet\n");
+
+ status = dcerpc_wkssvc_NetrWorkstationStatisticsGet(p, tctx, &r);
+ torture_assert_ntstatus_ok(tctx, status,
+ "NetrWorkstationStatisticsGet failed");
+ torture_assert_werr_ok(tctx, r.out.result,
+ "NetrWorkstationStatisticsGet failed");
+ return true;
+}
+
struct torture_suite *torture_rpc_wkssvc(TALLOC_CTX *mem_ctx)
{
struct torture_suite *suite;
@@ -764,5 +788,8 @@ struct torture_suite *torture_rpc_wkssvc(TALLOC_CTX *mem_ctx)
torture_rpc_tcase_add_test(tcase, "NetrEnumerateComputerNames",
test_NetrEnumerateComputerNames);
+ torture_rpc_tcase_add_test(tcase, "NetrWorkstationStatisticsGet",
+ test_NetrWorkstationStatisticsGet);
+
return suite;
}