]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Re-run make idl.
authorGünther Deschner <gd@samba.org>
Wed, 26 Mar 2008 10:35:44 +0000 (11:35 +0100)
committerGünther Deschner <gd@samba.org>
Wed, 26 Mar 2008 11:17:17 +0000 (12:17 +0100)
Guenther

source/librpc/gen_ndr/cli_ntsvcs.c
source/librpc/gen_ndr/cli_ntsvcs.h
source/librpc/gen_ndr/ndr_ntsvcs.c
source/librpc/gen_ndr/ntsvcs.h
source/librpc/gen_ndr/srv_ntsvcs.c

index 615cdb64c90ac7ab13f24abac72a941531923944..864caef1f3c122acff8d29fa4e0acf39cdb11d83 100644 (file)
@@ -566,12 +566,25 @@ NTSTATUS rpccli_PNP_GetDepth(struct rpc_pipe_client *cli,
 
 NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
                                     TALLOC_CTX *mem_ctx,
+                                    const char *devicepath /* [in] [ref,charset(UTF16)] */,
+                                    uint32_t property /* [in]  */,
+                                    uint32_t *unknown1 /* [in,out] [ref] */,
+                                    uint8_t *buffer /* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */,
+                                    uint32_t *buffer_size /* [in,out] [ref] */,
+                                    uint32_t *needed /* [in,out] [ref] */,
+                                    uint32_t unknown3 /* [in]  */,
                                     WERROR *werror)
 {
        struct PNP_GetDeviceRegProp r;
        NTSTATUS status;
 
        /* In parameters */
+       r.in.devicepath = devicepath;
+       r.in.property = property;
+       r.in.unknown1 = unknown1;
+       r.in.buffer_size = buffer_size;
+       r.in.needed = needed;
+       r.in.unknown3 = unknown3;
 
        if (DEBUGLEVEL >= 10) {
                NDR_PRINT_IN_DEBUG(PNP_GetDeviceRegProp, &r);
@@ -597,6 +610,10 @@ NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
        }
 
        /* Return variables */
+       *unknown1 = *r.out.unknown1;
+       memcpy(buffer, r.out.buffer, *r.in.buffer_size);
+       *buffer_size = *r.out.buffer_size;
+       *needed = *r.out.needed;
 
        /* Return result */
        if (werror) {
index c20673f96b69a2398c982ed15fc123dfbdd3d712..a52a79ecc5da6b6c8c076f64cc37bd6626768723 100644 (file)
@@ -48,6 +48,13 @@ NTSTATUS rpccli_PNP_GetDepth(struct rpc_pipe_client *cli,
                             WERROR *werror);
 NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
                                     TALLOC_CTX *mem_ctx,
+                                    const char *devicepath /* [in] [ref,charset(UTF16)] */,
+                                    uint32_t property /* [in]  */,
+                                    uint32_t *unknown1 /* [in,out] [ref] */,
+                                    uint8_t *buffer /* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */,
+                                    uint32_t *buffer_size /* [in,out] [ref] */,
+                                    uint32_t *needed /* [in,out] [ref] */,
+                                    uint32_t unknown3 /* [in]  */,
                                     WERROR *werror);
 NTSTATUS rpccli_PNP_SetDeviceRegProp(struct rpc_pipe_client *cli,
                                     TALLOC_CTX *mem_ctx,
index 9a0e2bcf4f49149ef579f772e0736b2190d81003..1ce5b15a8823aeebb05b1825a2cb98535236a3d9 100644 (file)
@@ -688,8 +688,48 @@ _PUBLIC_ void ndr_print_PNP_GetDepth(struct ndr_print *ndr, const char *name, in
 static enum ndr_err_code ndr_push_PNP_GetDeviceRegProp(struct ndr_push *ndr, int flags, const struct PNP_GetDeviceRegProp *r)
 {
        if (flags & NDR_IN) {
+               if (r->in.devicepath == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.devicepath, CH_UTF16)));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.devicepath, CH_UTF16)));
+               NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.devicepath, ndr_charset_length(r->in.devicepath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.property));
+               if (r->in.unknown1 == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.unknown1));
+               if (r->in.buffer_size == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.buffer_size));
+               if (r->in.needed == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.needed));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown3));
        }
        if (flags & NDR_OUT) {
+               if (r->out.unknown1 == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.unknown1));
+               if (r->out.buffer == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.buffer_size));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.buffer_size));
+               NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, *r->out.buffer_size));
+               if (r->out.buffer_size == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.buffer_size));
+               if (r->out.needed == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
        }
        return NDR_ERR_SUCCESS;
@@ -697,10 +737,89 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceRegProp(struct ndr_push *ndr, int
 
 static enum ndr_err_code ndr_pull_PNP_GetDeviceRegProp(struct ndr_pull *ndr, int flags, struct PNP_GetDeviceRegProp *r)
 {
+       TALLOC_CTX *_mem_save_unknown1_0;
+       TALLOC_CTX *_mem_save_buffer_size_0;
+       TALLOC_CTX *_mem_save_needed_0;
        if (flags & NDR_IN) {
+               ZERO_STRUCT(r->out);
+
+               NDR_CHECK(ndr_pull_array_size(ndr, &r->in.devicepath));
+               NDR_CHECK(ndr_pull_array_length(ndr, &r->in.devicepath));
+               if (ndr_get_array_length(ndr, &r->in.devicepath) > ndr_get_array_size(ndr, &r->in.devicepath)) {
+                       return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.devicepath), ndr_get_array_length(ndr, &r->in.devicepath));
+               }
+               NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.devicepath), sizeof(uint16_t)));
+               NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.devicepath, ndr_get_array_length(ndr, &r->in.devicepath), sizeof(uint16_t), CH_UTF16));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.property));
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->in.unknown1);
+               }
+               _mem_save_unknown1_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown1, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.unknown1));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown1_0, LIBNDR_FLAG_REF_ALLOC);
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->in.buffer_size);
+               }
+               _mem_save_buffer_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer_size, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.buffer_size));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_size_0, LIBNDR_FLAG_REF_ALLOC);
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->in.needed);
+               }
+               _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.needed, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.needed));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown3));
+               NDR_PULL_ALLOC(ndr, r->out.unknown1);
+               *r->out.unknown1 = *r->in.unknown1;
+               NDR_PULL_ALLOC_N(ndr, r->out.buffer, *r->in.buffer_size);
+               memset(r->out.buffer, 0, (*r->in.buffer_size) * sizeof(*r->out.buffer));
+               NDR_PULL_ALLOC(ndr, r->out.buffer_size);
+               *r->out.buffer_size = *r->in.buffer_size;
+               NDR_PULL_ALLOC(ndr, r->out.needed);
+               *r->out.needed = *r->in.needed;
        }
        if (flags & NDR_OUT) {
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->out.unknown1);
+               }
+               _mem_save_unknown1_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown1, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.unknown1));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown1_0, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
+               NDR_CHECK(ndr_pull_array_length(ndr, &r->out.buffer));
+               if (ndr_get_array_length(ndr, &r->out.buffer) > ndr_get_array_size(ndr, &r->out.buffer)) {
+                       return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->out.buffer), ndr_get_array_length(ndr, &r->out.buffer));
+               }
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
+               }
+               NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, ndr_get_array_length(ndr, &r->out.buffer)));
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->out.buffer_size);
+               }
+               _mem_save_buffer_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->out.buffer_size, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.buffer_size));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_size_0, LIBNDR_FLAG_REF_ALLOC);
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->out.needed);
+               }
+               _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+               if (r->out.buffer) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, *r->out.buffer_size));
+               }
+               if (r->out.buffer) {
+                       NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.buffer, *r->out.buffer_size));
+               }
        }
        return NDR_ERR_SUCCESS;
 }
@@ -715,11 +834,45 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceRegProp(struct ndr_print *ndr, const char *
        if (flags & NDR_IN) {
                ndr_print_struct(ndr, "in", "PNP_GetDeviceRegProp");
                ndr->depth++;
+               ndr_print_ptr(ndr, "devicepath", r->in.devicepath);
+               ndr->depth++;
+               ndr_print_string(ndr, "devicepath", r->in.devicepath);
+               ndr->depth--;
+               ndr_print_uint32(ndr, "property", r->in.property);
+               ndr_print_ptr(ndr, "unknown1", r->in.unknown1);
+               ndr->depth++;
+               ndr_print_uint32(ndr, "unknown1", *r->in.unknown1);
+               ndr->depth--;
+               ndr_print_ptr(ndr, "buffer_size", r->in.buffer_size);
+               ndr->depth++;
+               ndr_print_uint32(ndr, "buffer_size", *r->in.buffer_size);
+               ndr->depth--;
+               ndr_print_ptr(ndr, "needed", r->in.needed);
+               ndr->depth++;
+               ndr_print_uint32(ndr, "needed", *r->in.needed);
+               ndr->depth--;
+               ndr_print_uint32(ndr, "unknown3", r->in.unknown3);
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
                ndr_print_struct(ndr, "out", "PNP_GetDeviceRegProp");
                ndr->depth++;
+               ndr_print_ptr(ndr, "unknown1", r->out.unknown1);
+               ndr->depth++;
+               ndr_print_uint32(ndr, "unknown1", *r->out.unknown1);
+               ndr->depth--;
+               ndr_print_ptr(ndr, "buffer", r->out.buffer);
+               ndr->depth++;
+               ndr_print_array_uint8(ndr, "buffer", r->out.buffer, *r->out.buffer_size);
+               ndr->depth--;
+               ndr_print_ptr(ndr, "buffer_size", r->out.buffer_size);
+               ndr->depth++;
+               ndr_print_uint32(ndr, "buffer_size", *r->out.buffer_size);
+               ndr->depth--;
+               ndr_print_ptr(ndr, "needed", r->out.needed);
+               ndr->depth++;
+               ndr_print_uint32(ndr, "needed", *r->out.needed);
+               ndr->depth--;
                ndr_print_WERROR(ndr, "result", r->out.result);
                ndr->depth--;
        }
index 9cdfa656b4148877a144bcf9d2abfc7d8aba60ac..95484e49f5063ff7fc396a9e39fe68a6645652bc 100644 (file)
@@ -5,6 +5,7 @@
 #ifndef _HEADER_ntsvcs
 #define _HEADER_ntsvcs
 
+#define DEV_REGPROP_DESC       ( 1 )
 struct PNP_HwProfInfo {
        uint32_t unknown1;
        uint16_t unknown2[160];
@@ -130,6 +131,19 @@ struct PNP_GetDepth {
 
 struct PNP_GetDeviceRegProp {
        struct {
+               const char *devicepath;/* [ref,charset(UTF16)] */
+               uint32_t property;
+               uint32_t unknown3;
+               uint32_t *unknown1;/* [ref] */
+               uint32_t *buffer_size;/* [ref] */
+               uint32_t *needed;/* [ref] */
+       } in;
+
+       struct {
+               uint8_t *buffer;/* [ref,length_is(*buffer_size),size_is(*buffer_size)] */
+               uint32_t *unknown1;/* [ref] */
+               uint32_t *buffer_size;/* [ref] */
+               uint32_t *needed;/* [ref] */
                WERROR result;
        } out;
 
index 339de6c747a3d4a63fd5b8e8286bf4ef2014c321..523b4d8c91e4c71ec4fa6bc85c2aab3fa1758d2c 100644 (file)
@@ -1007,6 +1007,16 @@ static bool api_PNP_GetDeviceRegProp(pipes_struct *p)
                NDR_PRINT_IN_DEBUG(PNP_GetDeviceRegProp, r);
        }
 
+       ZERO_STRUCT(r->out);
+       r->out.unknown1 = r->in.unknown1;
+       r->out.buffer = talloc_zero_array(r, uint8_t, *r->out.buffer_size);
+       if (r->out.buffer == NULL) {
+               talloc_free(r);
+               return false;
+       }
+
+       r->out.buffer_size = r->in.buffer_size;
+       r->out.needed = r->in.needed;
        r->out.result = _PNP_GetDeviceRegProp(p, r);
 
        if (p->rng_fault_state) {