summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/librpc/idl/srvsvc.idl2
-rw-r--r--source4/rpc_server/srvsvc/dcesrv_srvsvc.c10
-rw-r--r--source4/torture/rpc/srvsvc.c2
3 files changed, 8 insertions, 6 deletions
diff --git a/source4/librpc/idl/srvsvc.idl b/source4/librpc/idl/srvsvc.idl
index a3faaad1fd..f925fe9258 100644
--- a/source4/librpc/idl/srvsvc.idl
+++ b/source4/librpc/idl/srvsvc.idl
@@ -620,7 +620,7 @@ import "security.idl", "svcctl.idl";
WERROR srvsvc_NetShareCheck(
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
[in] [string,charset(UTF16)] uint16 device_name[],
- [out] srvsvc_ShareType type
+ [out,ref] srvsvc_ShareType *type
);
/**************************/
diff --git a/source4/rpc_server/srvsvc/dcesrv_srvsvc.c b/source4/rpc_server/srvsvc/dcesrv_srvsvc.c
index 8a5f6708c3..edb48cee29 100644
--- a/source4/rpc_server/srvsvc/dcesrv_srvsvc.c
+++ b/source4/rpc_server/srvsvc/dcesrv_srvsvc.c
@@ -1395,13 +1395,13 @@ static WERROR dcesrv_srvsvc_NetShareCheck(struct dcesrv_call_state *dce_call, TA
const char **names;
int count, i;
- ZERO_STRUCT(r->out);
+ *r->out.type = 0;
/* TODO: - access check
*/
if (strcmp("", r->in.device_name) == 0) {
- r->out.type = STYPE_IPC;
+ *r->out.type = STYPE_IPC;
return WERR_OK;
}
@@ -1440,17 +1440,17 @@ static WERROR dcesrv_srvsvc_NetShareCheck(struct dcesrv_call_state *dce_call, TA
if (!type) continue;
if (strcmp(type, "DISK") == 0) {
- r->out.type = STYPE_DISKTREE;
+ *r->out.type = STYPE_DISKTREE;
return WERR_OK;
}
if (strcmp(type, "IPC") == 0) {
- r->out.type = STYPE_IPC;
+ *r->out.type = STYPE_IPC;
return WERR_OK;
}
if (strcmp(type, "PRINTER") == 0) {
- r->out.type = STYPE_PRINTQ;
+ *r->out.type = STYPE_PRINTQ;
return WERR_OK;
}
}
diff --git a/source4/torture/rpc/srvsvc.c b/source4/torture/rpc/srvsvc.c
index 4ddab75883..55352278e7 100644
--- a/source4/torture/rpc/srvsvc.c
+++ b/source4/torture/rpc/srvsvc.c
@@ -362,9 +362,11 @@ static bool test_NetShareCheck(struct dcerpc_pipe *p, struct torture_context *tc
{
NTSTATUS status;
struct srvsvc_NetShareCheck r;
+ enum srvsvc_ShareType type;
r.in.server_unc = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
r.in.device_name = device_name;
+ r.out.type = &type;
torture_comment(tctx,
"testing NetShareCheck on device '%s'\n", r.in.device_name);