summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/librpc/idl/wkssvc.idl13
-rw-r--r--source4/rpc_server/wkssvc/dcesrv_wkssvc.c6
-rw-r--r--source4/torture/rpc/wkssvc.c25
3 files changed, 40 insertions, 4 deletions
diff --git a/source4/librpc/idl/wkssvc.idl b/source4/librpc/idl/wkssvc.idl
index 8ed0b2443b..3055099538 100644
--- a/source4/librpc/idl/wkssvc.idl
+++ b/source4/librpc/idl/wkssvc.idl
@@ -489,7 +489,18 @@ import "srvsvc.idl", "lsa.idl";
/*****************************/
/* Function 0x14 */
- WERROR WKSSVC_NETRGETJOININFORMATION ();
+ typedef enum {
+ NetSetupUnknownStatus = 0,
+ NetSetupUnjoined = 1,
+ NetSetupWorkgroupName = 2,
+ NetSetupDomainName = 3
+ } wkssvc_NetJoinStatus;
+
+ WERROR wkssvc_NetrGetJoinInformation(
+ [in] [string,charset(UTF16)] uint16 *server_name,
+ [in,out,ref] [string,charset(UTF16)] uint16 **name_buffer,
+ [out,ref] wkssvc_NetJoinStatus *name_type
+ );
/*****************************/
/* Function 0x15 */
diff --git a/source4/rpc_server/wkssvc/dcesrv_wkssvc.c b/source4/rpc_server/wkssvc/dcesrv_wkssvc.c
index 699cd5d266..864c9857d2 100644
--- a/source4/rpc_server/wkssvc/dcesrv_wkssvc.c
+++ b/source4/rpc_server/wkssvc/dcesrv_wkssvc.c
@@ -303,10 +303,10 @@ static WERROR dcesrv_wkssvc_NetrValidateName(struct dcesrv_call_state *dce_call,
/*
- WKSSVC_NETRGETJOININFORMATION
+ wkssvc_NetrGetJoinInformation
*/
-static WERROR dcesrv_WKSSVC_NETRGETJOININFORMATION(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct WKSSVC_NETRGETJOININFORMATION *r)
+static WERROR dcesrv_wkssvc_NetrGetJoinInformation(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct wkssvc_NetrGetJoinInformation *r)
{
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
diff --git a/source4/torture/rpc/wkssvc.c b/source4/torture/rpc/wkssvc.c
index 8c86b7e98a..4ab6b79ce6 100644
--- a/source4/torture/rpc/wkssvc.c
+++ b/source4/torture/rpc/wkssvc.c
@@ -978,6 +978,28 @@ static bool test_NetrMessageBufferSend(struct torture_context *tctx,
return true;
}
+static bool test_NetrGetJoinInformation(struct torture_context *tctx,
+ struct dcerpc_pipe *p)
+{
+ NTSTATUS status;
+ struct wkssvc_NetrGetJoinInformation r;
+ enum wkssvc_NetJoinStatus join_status;
+ const char *name_buffer = "";
+
+ r.in.server_name = dcerpc_server_name(p);
+ r.in.name_buffer = r.out.name_buffer = &name_buffer;
+ r.out.name_type = &join_status;
+
+ torture_comment(tctx, "testing NetrGetJoinInformation\n");
+
+ status = dcerpc_wkssvc_NetrGetJoinInformation(p, tctx, &r);
+ torture_assert_ntstatus_ok(tctx, status,
+ "NetrGetJoinInformation failed");
+ torture_assert_werr_ok(tctx, r.out.result,
+ "NetrGetJoinInformation failed");
+ return true;
+}
+
struct torture_suite *torture_rpc_wkssvc(TALLOC_CTX *mem_ctx)
{
struct torture_suite *suite;
@@ -1036,6 +1058,9 @@ 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, "NetrGetJoinInformation",
+ test_NetrGetJoinInformation);
+
torture_rpc_tcase_add_test(tcase, "NetrWorkstationStatisticsGet",
test_NetrWorkstationStatisticsGet);
torture_rpc_tcase_add_test(tcase, "NetrMessageBufferSend",