summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/librpc/gen_ndr/cli_netlogon.c6
-rw-r--r--source3/librpc/gen_ndr/cli_netlogon.h6
-rw-r--r--source3/librpc/gen_ndr/ndr_netlogon.c75
-rw-r--r--source3/librpc/gen_ndr/netlogon.h6
-rw-r--r--source3/librpc/gen_ndr/srv_netlogon.c2
5 files changed, 58 insertions, 37 deletions
diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c
index 2241d3092a..275c83a450 100644
--- a/source3/librpc/gen_ndr/cli_netlogon.c
+++ b/source3/librpc/gen_ndr/cli_netlogon.c
@@ -890,11 +890,11 @@ NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const char *logon_server /* [in] [charset(UTF16)] */,
const char *computername /* [in] [charset(UTF16)] */,
- struct netr_Authenticator credential /* [in] */,
+ struct netr_Authenticator *credential /* [in] [ref] */,
struct netr_Authenticator *return_authenticator /* [in,out] [ref] */,
- uint8_t *change_log_entry /* [in] [unique,size_is(change_log_entry_size)] */,
+ uint8_t *change_log_entry /* [in] [ref,size_is(change_log_entry_size)] */,
uint32_t change_log_entry_size /* [in] */,
- struct netr_DELTA_ENUM_ARRAY *delta_enum_array /* [out] [ref] */)
+ struct netr_DELTA_ENUM_ARRAY **delta_enum_array /* [out] [ref] */)
{
struct netr_DatabaseRedo r;
NTSTATUS status;
diff --git a/source3/librpc/gen_ndr/cli_netlogon.h b/source3/librpc/gen_ndr/cli_netlogon.h
index 09484c85d0..5adf8e8cad 100644
--- a/source3/librpc/gen_ndr/cli_netlogon.h
+++ b/source3/librpc/gen_ndr/cli_netlogon.h
@@ -156,11 +156,11 @@ NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const char *logon_server /* [in] [charset(UTF16)] */,
const char *computername /* [in] [charset(UTF16)] */,
- struct netr_Authenticator credential /* [in] */,
+ struct netr_Authenticator *credential /* [in] [ref] */,
struct netr_Authenticator *return_authenticator /* [in,out] [ref] */,
- uint8_t *change_log_entry /* [in] [unique,size_is(change_log_entry_size)] */,
+ uint8_t *change_log_entry /* [in] [ref,size_is(change_log_entry_size)] */,
uint32_t change_log_entry_size /* [in] */,
- struct netr_DELTA_ENUM_ARRAY *delta_enum_array /* [out] [ref] */);
+ struct netr_DELTA_ENUM_ARRAY **delta_enum_array /* [out] [ref] */);
NTSTATUS rpccli_netr_LogonControl2Ex(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const char *logon_server /* [in] [unique,charset(UTF16)] */,
diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c
index 290d0fd9cd..12ab98e610 100644
--- a/source3/librpc/gen_ndr/ndr_netlogon.c
+++ b/source3/librpc/gen_ndr/ndr_netlogon.c
@@ -11299,17 +11299,20 @@ static enum ndr_err_code ndr_push_netr_DatabaseRedo(struct ndr_push *ndr, int fl
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computername, ndr_charset_length(r->in.computername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
- NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
+ if (r->in.credential == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
if (r->in.return_authenticator == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.change_log_entry));
- if (r->in.change_log_entry) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.change_log_entry_size));
- NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.change_log_entry, r->in.change_log_entry_size));
+ if (r->in.change_log_entry == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.change_log_entry_size));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.change_log_entry, r->in.change_log_entry_size));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.change_log_entry_size));
}
if (flags & NDR_OUT) {
if (r->out.return_authenticator == NULL) {
@@ -11319,7 +11322,10 @@ static enum ndr_err_code ndr_push_netr_DatabaseRedo(struct ndr_push *ndr, int fl
if (r->out.delta_enum_array == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.delta_enum_array));
+ if (*r->out.delta_enum_array) {
+ NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
+ }
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -11327,10 +11333,11 @@ static enum ndr_err_code ndr_push_netr_DatabaseRedo(struct ndr_push *ndr, int fl
static enum ndr_err_code ndr_pull_netr_DatabaseRedo(struct ndr_pull *ndr, int flags, struct netr_DatabaseRedo *r)
{
- uint32_t _ptr_change_log_entry;
+ uint32_t _ptr_delta_enum_array;
+ TALLOC_CTX *_mem_save_credential_0;
TALLOC_CTX *_mem_save_return_authenticator_0;
- TALLOC_CTX *_mem_save_change_log_entry_0;
TALLOC_CTX *_mem_save_delta_enum_array_0;
+ TALLOC_CTX *_mem_save_delta_enum_array_1;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -11348,7 +11355,13 @@ static enum ndr_err_code ndr_pull_netr_DatabaseRedo(struct ndr_pull *ndr, int fl
}
NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computername), sizeof(uint16_t)));
NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, ndr_get_array_length(ndr, &r->in.computername), sizeof(uint16_t), CH_UTF16));
- NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.credential);
+ }
+ _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
}
@@ -11356,20 +11369,11 @@ static enum ndr_err_code ndr_pull_netr_DatabaseRedo(struct ndr_pull *ndr, int fl
NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_change_log_entry));
- if (_ptr_change_log_entry) {
- NDR_PULL_ALLOC(ndr, r->in.change_log_entry);
- } else {
- r->in.change_log_entry = NULL;
- }
- if (r->in.change_log_entry) {
- _mem_save_change_log_entry_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->in.change_log_entry, 0);
- NDR_CHECK(ndr_pull_array_size(ndr, &r->in.change_log_entry));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.change_log_entry));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC_N(ndr, r->in.change_log_entry, ndr_get_array_size(ndr, &r->in.change_log_entry));
- NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.change_log_entry, ndr_get_array_size(ndr, &r->in.change_log_entry)));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_change_log_entry_0, 0);
}
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.change_log_entry, ndr_get_array_size(ndr, &r->in.change_log_entry)));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.change_log_entry_size));
NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
*r->out.return_authenticator = *r->in.return_authenticator;
@@ -11392,7 +11396,18 @@ static enum ndr_err_code ndr_pull_netr_DatabaseRedo(struct ndr_pull *ndr, int fl
}
_mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array));
+ if (_ptr_delta_enum_array) {
+ NDR_PULL_ALLOC(ndr, *r->out.delta_enum_array);
+ } else {
+ *r->out.delta_enum_array = NULL;
+ }
+ if (*r->out.delta_enum_array) {
+ _mem_save_delta_enum_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.delta_enum_array, 0);
+ NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_1, 0);
+ }
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
}
@@ -11411,16 +11426,17 @@ _PUBLIC_ void ndr_print_netr_DatabaseRedo(struct ndr_print *ndr, const char *nam
ndr->depth++;
ndr_print_string(ndr, "logon_server", r->in.logon_server);
ndr_print_string(ndr, "computername", r->in.computername);
- ndr_print_netr_Authenticator(ndr, "credential", &r->in.credential);
+ ndr_print_ptr(ndr, "credential", r->in.credential);
+ ndr->depth++;
+ ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
+ ndr->depth--;
ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
ndr->depth++;
ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
ndr->depth--;
ndr_print_ptr(ndr, "change_log_entry", r->in.change_log_entry);
ndr->depth++;
- if (r->in.change_log_entry) {
- ndr_print_array_uint8(ndr, "change_log_entry", r->in.change_log_entry, r->in.change_log_entry_size);
- }
+ ndr_print_array_uint8(ndr, "change_log_entry", r->in.change_log_entry, r->in.change_log_entry_size);
ndr->depth--;
ndr_print_uint32(ndr, "change_log_entry_size", r->in.change_log_entry_size);
ndr->depth--;
@@ -11434,7 +11450,12 @@ _PUBLIC_ void ndr_print_netr_DatabaseRedo(struct ndr_print *ndr, const char *nam
ndr->depth--;
ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array);
ndr->depth++;
- ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", r->out.delta_enum_array);
+ ndr_print_ptr(ndr, "delta_enum_array", *r->out.delta_enum_array);
+ ndr->depth++;
+ if (*r->out.delta_enum_array) {
+ ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", *r->out.delta_enum_array);
+ }
+ ndr->depth--;
ndr->depth--;
ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;
diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h
index 9f5d28a95f..fd9e08b461 100644
--- a/source3/librpc/gen_ndr/netlogon.h
+++ b/source3/librpc/gen_ndr/netlogon.h
@@ -1251,14 +1251,14 @@ struct netr_DatabaseRedo {
struct {
const char *logon_server;/* [charset(UTF16)] */
const char *computername;/* [charset(UTF16)] */
- struct netr_Authenticator credential;
- uint8_t *change_log_entry;/* [unique,size_is(change_log_entry_size)] */
+ struct netr_Authenticator *credential;/* [ref] */
+ uint8_t *change_log_entry;/* [ref,size_is(change_log_entry_size)] */
uint32_t change_log_entry_size;
struct netr_Authenticator *return_authenticator;/* [ref] */
} in;
struct {
- struct netr_DELTA_ENUM_ARRAY *delta_enum_array;/* [ref] */
+ struct netr_DELTA_ENUM_ARRAY **delta_enum_array;/* [ref] */
struct netr_Authenticator *return_authenticator;/* [ref] */
NTSTATUS result;
} out;
diff --git a/source3/librpc/gen_ndr/srv_netlogon.c b/source3/librpc/gen_ndr/srv_netlogon.c
index b740e7b333..9546b2551b 100644
--- a/source3/librpc/gen_ndr/srv_netlogon.c
+++ b/source3/librpc/gen_ndr/srv_netlogon.c
@@ -1454,7 +1454,7 @@ static bool api_netr_DatabaseRedo(pipes_struct *p)
ZERO_STRUCT(r->out);
r->out.return_authenticator = r->in.return_authenticator;
- r->out.delta_enum_array = talloc_zero(r, struct netr_DELTA_ENUM_ARRAY);
+ r->out.delta_enum_array = talloc_zero(r, struct netr_DELTA_ENUM_ARRAY *);
if (r->out.delta_enum_array == NULL) {
talloc_free(r);
return false;