Re-run make idl.
authorGünther Deschner <gd@samba.org>
Fri, 15 Feb 2008 22:32:02 +0000 (23:32 +0100)
committerGünther Deschner <gd@samba.org>
Fri, 15 Feb 2008 22:32:02 +0000 (23:32 +0100)
Guenther
(This used to be commit b7818ec598fc942ba9c86dac0d47e239a6953301)

source3/librpc/gen_ndr/cli_netlogon.c
source3/librpc/gen_ndr/cli_netlogon.h
source3/librpc/gen_ndr/ndr_netlogon.c
source3/librpc/gen_ndr/ndr_winreg.c
source3/librpc/gen_ndr/netlogon.h
source3/librpc/gen_ndr/srv_netlogon.c

index ef9eeaf7c26bb83e70a2b245512380f0fa406bbd..e8b4243713a536609e8074da4540e4baebb4ea78 100644 (file)
@@ -220,7 +220,8 @@ NTSTATUS rpccli_netr_ServerReqChallenge(struct rpc_pipe_client *cli,
                                        TALLOC_CTX *mem_ctx,
                                        const char *server_name,
                                        const char *computer_name,
-                                       struct netr_Credential *credentials)
+                                       struct netr_Credential *credentials,
+                                       struct netr_Credential *return_credentials)
 {
        struct netr_ServerReqChallenge r;
        NTSTATUS status;
@@ -254,7 +255,7 @@ NTSTATUS rpccli_netr_ServerReqChallenge(struct rpc_pipe_client *cli,
        }
 
        /* Return variables */
-       *credentials = *r.out.credentials;
+       *return_credentials = *r.out.return_credentials;
 
        /* Return result */
        return r.out.result;
@@ -266,7 +267,8 @@ NTSTATUS rpccli_netr_ServerAuthenticate(struct rpc_pipe_client *cli,
                                        const char *account_name,
                                        enum netr_SchannelType secure_channel_type,
                                        const char *computer_name,
-                                       struct netr_Credential *credentials)
+                                       struct netr_Credential *credentials,
+                                       struct netr_Credential *return_credentials)
 {
        struct netr_ServerAuthenticate r;
        NTSTATUS status;
@@ -302,7 +304,7 @@ NTSTATUS rpccli_netr_ServerAuthenticate(struct rpc_pipe_client *cli,
        }
 
        /* Return variables */
-       *credentials = *r.out.credentials;
+       *return_credentials = *r.out.return_credentials;
 
        /* Return result */
        return r.out.result;
@@ -799,6 +801,7 @@ NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli,
                                         enum netr_SchannelType secure_channel_type,
                                         const char *computer_name,
                                         struct netr_Credential *credentials,
+                                        struct netr_Credential *return_credentials,
                                         uint32_t *negotiate_flags)
 {
        struct netr_ServerAuthenticate2 r;
@@ -836,7 +839,7 @@ NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli,
        }
 
        /* Return variables */
-       *credentials = *r.out.credentials;
+       *return_credentials = *r.out.return_credentials;
        *negotiate_flags = *r.out.negotiate_flags;
 
        /* Return result */
index 35f903267dda0a7a1f6fe66bd0e2d195c6a3aac9..706b7942b688f3dc5958273855934cbb74b7c163 100644 (file)
@@ -38,14 +38,16 @@ NTSTATUS rpccli_netr_ServerReqChallenge(struct rpc_pipe_client *cli,
                                        TALLOC_CTX *mem_ctx,
                                        const char *server_name,
                                        const char *computer_name,
-                                       struct netr_Credential *credentials);
+                                       struct netr_Credential *credentials,
+                                       struct netr_Credential *return_credentials);
 NTSTATUS rpccli_netr_ServerAuthenticate(struct rpc_pipe_client *cli,
                                        TALLOC_CTX *mem_ctx,
                                        const char *server_name,
                                        const char *account_name,
                                        enum netr_SchannelType secure_channel_type,
                                        const char *computer_name,
-                                       struct netr_Credential *credentials);
+                                       struct netr_Credential *credentials,
+                                       struct netr_Credential *return_credentials);
 NTSTATUS rpccli_netr_ServerPasswordSet(struct rpc_pipe_client *cli,
                                       TALLOC_CTX *mem_ctx,
                                       const char *server_name,
@@ -137,6 +139,7 @@ NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli,
                                         enum netr_SchannelType secure_channel_type,
                                         const char *computer_name,
                                         struct netr_Credential *credentials,
+                                        struct netr_Credential *return_credentials,
                                         uint32_t *negotiate_flags);
 NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli,
                                   TALLOC_CTX *mem_ctx,
index e5766487b3a37fc8424387ba15adda2246f0cd15..a81ae097d60adae294eb1aaf80290f6cab671bdf 100644 (file)
@@ -8608,10 +8608,10 @@ static enum ndr_err_code ndr_push_netr_ServerReqChallenge(struct ndr_push *ndr,
                NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
        }
        if (flags & NDR_OUT) {
-               if (r->out.credentials == NULL) {
+               if (r->out.return_credentials == NULL) {
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
                }
-               NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
+               NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
                NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
        }
        return NDR_ERR_SUCCESS;
@@ -8622,6 +8622,7 @@ static enum ndr_err_code ndr_pull_netr_ServerReqChallenge(struct ndr_pull *ndr,
        uint32_t _ptr_server_name;
        TALLOC_CTX *_mem_save_server_name_0;
        TALLOC_CTX *_mem_save_credentials_0;
+       TALLOC_CTX *_mem_save_return_credentials_0;
        if (flags & NDR_IN) {
                ZERO_STRUCT(r->out);
 
@@ -8657,17 +8658,17 @@ static enum ndr_err_code ndr_pull_netr_ServerReqChallenge(struct ndr_pull *ndr,
                NDR_PULL_SET_MEM_CTX(ndr, r->in.credentials, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
-               NDR_PULL_ALLOC(ndr, r->out.credentials);
-               *r->out.credentials = *r->in.credentials;
+               NDR_PULL_ALLOC(ndr, r->out.return_credentials);
+               ZERO_STRUCTP(r->out.return_credentials);
        }
        if (flags & NDR_OUT) {
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                       NDR_PULL_ALLOC(ndr, r->out.credentials);
+                       NDR_PULL_ALLOC(ndr, r->out.return_credentials);
                }
-               _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_PULL_SET_MEM_CTX(ndr, r->out.credentials, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
-               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
+               _mem_save_return_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->out.return_credentials, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_credentials_0, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
        }
        return NDR_ERR_SUCCESS;
@@ -8699,9 +8700,9 @@ _PUBLIC_ void ndr_print_netr_ServerReqChallenge(struct ndr_print *ndr, const cha
        if (flags & NDR_OUT) {
                ndr_print_struct(ndr, "out", "netr_ServerReqChallenge");
                ndr->depth++;
-               ndr_print_ptr(ndr, "credentials", r->out.credentials);
+               ndr_print_ptr(ndr, "return_credentials", r->out.return_credentials);
                ndr->depth++;
-               ndr_print_netr_Credential(ndr, "credentials", r->out.credentials);
+               ndr_print_netr_Credential(ndr, "return_credentials", r->out.return_credentials);
                ndr->depth--;
                ndr_print_NTSTATUS(ndr, "result", r->out.result);
                ndr->depth--;
@@ -8734,10 +8735,10 @@ static enum ndr_err_code ndr_push_netr_ServerAuthenticate(struct ndr_push *ndr,
                NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
        }
        if (flags & NDR_OUT) {
-               if (r->out.credentials == NULL) {
+               if (r->out.return_credentials == NULL) {
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
                }
-               NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
+               NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
                NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
        }
        return NDR_ERR_SUCCESS;
@@ -8748,6 +8749,7 @@ static enum ndr_err_code ndr_pull_netr_ServerAuthenticate(struct ndr_pull *ndr,
        uint32_t _ptr_server_name;
        TALLOC_CTX *_mem_save_server_name_0;
        TALLOC_CTX *_mem_save_credentials_0;
+       TALLOC_CTX *_mem_save_return_credentials_0;
        if (flags & NDR_IN) {
                ZERO_STRUCT(r->out);
 
@@ -8791,17 +8793,17 @@ static enum ndr_err_code ndr_pull_netr_ServerAuthenticate(struct ndr_pull *ndr,
                NDR_PULL_SET_MEM_CTX(ndr, r->in.credentials, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
-               NDR_PULL_ALLOC(ndr, r->out.credentials);
-               *r->out.credentials = *r->in.credentials;
+               NDR_PULL_ALLOC(ndr, r->out.return_credentials);
+               ZERO_STRUCTP(r->out.return_credentials);
        }
        if (flags & NDR_OUT) {
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                       NDR_PULL_ALLOC(ndr, r->out.credentials);
+                       NDR_PULL_ALLOC(ndr, r->out.return_credentials);
                }
-               _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_PULL_SET_MEM_CTX(ndr, r->out.credentials, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
-               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
+               _mem_save_return_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->out.return_credentials, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_credentials_0, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
        }
        return NDR_ERR_SUCCESS;
@@ -8835,9 +8837,9 @@ _PUBLIC_ void ndr_print_netr_ServerAuthenticate(struct ndr_print *ndr, const cha
        if (flags & NDR_OUT) {
                ndr_print_struct(ndr, "out", "netr_ServerAuthenticate");
                ndr->depth++;
-               ndr_print_ptr(ndr, "credentials", r->out.credentials);
+               ndr_print_ptr(ndr, "return_credentials", r->out.return_credentials);
                ndr->depth++;
-               ndr_print_netr_Credential(ndr, "credentials", r->out.credentials);
+               ndr_print_netr_Credential(ndr, "return_credentials", r->out.return_credentials);
                ndr->depth--;
                ndr_print_NTSTATUS(ndr, "result", r->out.result);
                ndr->depth--;
@@ -10365,10 +10367,10 @@ static enum ndr_err_code ndr_push_netr_ServerAuthenticate2(struct ndr_push *ndr,
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.negotiate_flags));
        }
        if (flags & NDR_OUT) {
-               if (r->out.credentials == NULL) {
+               if (r->out.return_credentials == NULL) {
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
                }
-               NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
+               NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
                if (r->out.negotiate_flags == NULL) {
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
                }
@@ -10383,6 +10385,7 @@ static enum ndr_err_code ndr_pull_netr_ServerAuthenticate2(struct ndr_pull *ndr,
        uint32_t _ptr_server_name;
        TALLOC_CTX *_mem_save_server_name_0;
        TALLOC_CTX *_mem_save_credentials_0;
+       TALLOC_CTX *_mem_save_return_credentials_0;
        TALLOC_CTX *_mem_save_negotiate_flags_0;
        if (flags & NDR_IN) {
                ZERO_STRUCT(r->out);
@@ -10434,19 +10437,19 @@ static enum ndr_err_code ndr_pull_netr_ServerAuthenticate2(struct ndr_pull *ndr,
                NDR_PULL_SET_MEM_CTX(ndr, r->in.negotiate_flags, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.negotiate_flags));
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_negotiate_flags_0, LIBNDR_FLAG_REF_ALLOC);
-               NDR_PULL_ALLOC(ndr, r->out.credentials);
-               *r->out.credentials = *r->in.credentials;
+               NDR_PULL_ALLOC(ndr, r->out.return_credentials);
+               ZERO_STRUCTP(r->out.return_credentials);
                NDR_PULL_ALLOC(ndr, r->out.negotiate_flags);
                *r->out.negotiate_flags = *r->in.negotiate_flags;
        }
        if (flags & NDR_OUT) {
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                       NDR_PULL_ALLOC(ndr, r->out.credentials);
+                       NDR_PULL_ALLOC(ndr, r->out.return_credentials);
                }
-               _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_PULL_SET_MEM_CTX(ndr, r->out.credentials, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
-               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
+               _mem_save_return_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->out.return_credentials, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_credentials_0, LIBNDR_FLAG_REF_ALLOC);
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
                        NDR_PULL_ALLOC(ndr, r->out.negotiate_flags);
                }
@@ -10491,9 +10494,9 @@ _PUBLIC_ void ndr_print_netr_ServerAuthenticate2(struct ndr_print *ndr, const ch
        if (flags & NDR_OUT) {
                ndr_print_struct(ndr, "out", "netr_ServerAuthenticate2");
                ndr->depth++;
-               ndr_print_ptr(ndr, "credentials", r->out.credentials);
+               ndr_print_ptr(ndr, "return_credentials", r->out.return_credentials);
                ndr->depth++;
-               ndr_print_netr_Credential(ndr, "credentials", r->out.credentials);
+               ndr_print_netr_Credential(ndr, "return_credentials", r->out.return_credentials);
                ndr->depth--;
                ndr_print_ptr(ndr, "negotiate_flags", r->out.negotiate_flags);
                ndr->depth++;
index b63d4105878901986fd77714659705274da3f344..ed511a62dbfe562e911d59e1a867b9bf8ec7353a 100644 (file)
@@ -3700,7 +3700,7 @@ static enum ndr_err_code ndr_pull_winreg_QueryMultipleValues(struct ndr_pull *nd
                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);
                NDR_PULL_ALLOC_N(ndr, r->out.values, r->in.num_values);
-               memcpy(r->out.values, r->in.values, r->in.num_values * sizeof(*r->in.values));
+               memcpy(r->out.values, r->in.values, (r->in.num_values) * sizeof(*r->in.values));
                NDR_PULL_ALLOC(ndr, r->out.buffer_size);
                *r->out.buffer_size = *r->in.buffer_size;
                if (r->in.values) {
index c18527da00912b66363b8fa6d417e008713479d3..80434a1578f59ba0d2d084d74607342a35a85ee6 100644 (file)
@@ -890,7 +890,7 @@ struct netr_ServerReqChallenge {
        } in;
 
        struct {
-               struct netr_Credential *credentials;/* [ref] */
+               struct netr_Credential *return_credentials;/* [ref] */
                NTSTATUS result;
        } out;
 
@@ -907,7 +907,7 @@ struct netr_ServerAuthenticate {
        } in;
 
        struct {
-               struct netr_Credential *credentials;/* [ref] */
+               struct netr_Credential *return_credentials;/* [ref] */
                NTSTATUS result;
        } out;
 
@@ -1093,7 +1093,7 @@ struct netr_ServerAuthenticate2 {
        } in;
 
        struct {
-               struct netr_Credential *credentials;/* [ref] */
+               struct netr_Credential *return_credentials;/* [ref] */
                uint32_t *negotiate_flags;/* [ref] */
                NTSTATUS result;
        } out;
index 98ba48aa17220650c60bda45e2e18ff6f2b47931..67876f11ef82a5bf9d8a2973e275d537f42672f4 100644 (file)
@@ -367,7 +367,12 @@ static bool api_netr_ServerReqChallenge(pipes_struct *p)
        }
 
        ZERO_STRUCT(r->out);
-       r->out.credentials = r->in.credentials;
+       r->out.return_credentials = talloc_zero(r, struct netr_Credential);
+       if (r->out.return_credentials == NULL) {
+               talloc_free(r);
+               return false;
+       }
+
        r->out.result = _netr_ServerReqChallenge(p, r);
 
        if (p->rng_fault_state) {
@@ -442,7 +447,12 @@ static bool api_netr_ServerAuthenticate(pipes_struct *p)
        }
 
        ZERO_STRUCT(r->out);
-       r->out.credentials = r->in.credentials;
+       r->out.return_credentials = talloc_zero(r, struct netr_Credential);
+       if (r->out.return_credentials == NULL) {
+               talloc_free(r);
+               return false;
+       }
+
        r->out.result = _netr_ServerAuthenticate(p, r);
 
        if (p->rng_fault_state) {
@@ -1280,7 +1290,12 @@ static bool api_netr_ServerAuthenticate2(pipes_struct *p)
        }
 
        ZERO_STRUCT(r->out);
-       r->out.credentials = r->in.credentials;
+       r->out.return_credentials = talloc_zero(r, struct netr_Credential);
+       if (r->out.return_credentials == NULL) {
+               talloc_free(r);
+               return false;
+       }
+
        r->out.negotiate_flags = r->in.negotiate_flags;
        r->out.result = _netr_ServerAuthenticate2(p, r);