s4-srvsvc: merge srvsvc_NetShareCheck from s3 idl.
authorGünther Deschner <gd@samba.org>
Wed, 29 Oct 2008 13:19:14 +0000 (14:19 +0100)
committerGünther Deschner <gd@samba.org>
Fri, 31 Oct 2008 01:44:30 +0000 (02:44 +0100)
Guenther

source4/librpc/idl/srvsvc.idl
source4/rpc_server/srvsvc/dcesrv_srvsvc.c
source4/torture/rpc/srvsvc.c

index a3faaad1fd180df99364415fc345cdcee681d085..f925fe9258ec01e89072f68445ce38fbe5d74e49 100644 (file)
@@ -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
                );
 
 /**************************/
index 8a5f6708c375ad00aefed343c4112bedef9db0f2..edb48cee291da4ca05565152d2ebae0c9d68d966 100644 (file)
@@ -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;
                        }
                }
index 4ddab75883096ed0fbf3a1b72bb6f5538b2792e4..55352278e7fe763109732384e8e3ae8768e95aec 100644 (file)
@@ -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);