From ab66165cfe3e6bc673dfa285a3e03c2239e99442 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 4 Feb 2008 10:44:00 +0100 Subject: Re-run make idl. Guenther (This used to be commit ff6fb5de32ee81efc88d8c15f13c302e21790eee) --- source3/librpc/gen_ndr/cli_eventlog.c | 6 +++++- source3/librpc/gen_ndr/cli_eventlog.h | 4 +++- source3/librpc/gen_ndr/eventlog.h | 5 +++++ source3/librpc/gen_ndr/ndr_eventlog.c | 36 +++++++++++++++++++++++++++++++++++ source3/librpc/gen_ndr/srv_eventlog.c | 7 +++++++ 5 files changed, 56 insertions(+), 2 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_eventlog.c b/source3/librpc/gen_ndr/cli_eventlog.c index c756eee8d5..5418f25102 100644 --- a/source3/librpc/gen_ndr/cli_eventlog.c +++ b/source3/librpc/gen_ndr/cli_eventlog.c @@ -203,12 +203,15 @@ NTSTATUS rpccli_eventlog_GetNumRecords(struct rpc_pipe_client *cli, } NTSTATUS rpccli_eventlog_GetOldestRecord(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + struct policy_handle *handle, + uint32_t *oldest_entry) { struct eventlog_GetOldestRecord r; NTSTATUS status; /* In parameters */ + r.in.handle = handle; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(eventlog_GetOldestRecord, &r); @@ -234,6 +237,7 @@ NTSTATUS rpccli_eventlog_GetOldestRecord(struct rpc_pipe_client *cli, } /* Return variables */ + *oldest_entry = *r.out.oldest_entry; /* Return result */ return r.out.result; diff --git a/source3/librpc/gen_ndr/cli_eventlog.h b/source3/librpc/gen_ndr/cli_eventlog.h index 8cee82f885..2f6317c304 100644 --- a/source3/librpc/gen_ndr/cli_eventlog.h +++ b/source3/librpc/gen_ndr/cli_eventlog.h @@ -17,7 +17,9 @@ NTSTATUS rpccli_eventlog_GetNumRecords(struct rpc_pipe_client *cli, struct policy_handle *handle, uint32_t *number); NTSTATUS rpccli_eventlog_GetOldestRecord(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + struct policy_handle *handle, + uint32_t *oldest_entry); NTSTATUS rpccli_eventlog_ChangeNotify(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); NTSTATUS rpccli_eventlog_OpenEventLogW(struct rpc_pipe_client *cli, diff --git a/source3/librpc/gen_ndr/eventlog.h b/source3/librpc/gen_ndr/eventlog.h index 4b61b64f2a..8c7e34e49d 100644 --- a/source3/librpc/gen_ndr/eventlog.h +++ b/source3/librpc/gen_ndr/eventlog.h @@ -107,6 +107,11 @@ struct eventlog_GetNumRecords { struct eventlog_GetOldestRecord { struct { + struct policy_handle *handle;/* [ref] */ + } in; + + struct { + uint32_t *oldest_entry;/* [ref] */ NTSTATUS result; } out; diff --git a/source3/librpc/gen_ndr/ndr_eventlog.c b/source3/librpc/gen_ndr/ndr_eventlog.c index d7ff4681c2..de4da976a4 100644 --- a/source3/librpc/gen_ndr/ndr_eventlog.c +++ b/source3/librpc/gen_ndr/ndr_eventlog.c @@ -506,8 +506,16 @@ _PUBLIC_ void ndr_print_eventlog_GetNumRecords(struct ndr_print *ndr, const char static enum ndr_err_code ndr_push_eventlog_GetOldestRecord(struct ndr_push *ndr, int flags, const struct eventlog_GetOldestRecord *r) { if (flags & NDR_IN) { + if (r->in.handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); } if (flags & NDR_OUT) { + if (r->out.oldest_entry == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.oldest_entry)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -515,9 +523,29 @@ static enum ndr_err_code ndr_push_eventlog_GetOldestRecord(struct ndr_push *ndr, static enum ndr_err_code ndr_pull_eventlog_GetOldestRecord(struct ndr_pull *ndr, int flags, struct eventlog_GetOldestRecord *r) { + TALLOC_CTX *_mem_save_handle_0; + TALLOC_CTX *_mem_save_oldest_entry_0; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.handle); + } + _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.oldest_entry); + ZERO_STRUCTP(r->out.oldest_entry); } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.oldest_entry); + } + _mem_save_oldest_entry_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.oldest_entry, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.oldest_entry)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_oldest_entry_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -533,11 +561,19 @@ _PUBLIC_ void ndr_print_eventlog_GetOldestRecord(struct ndr_print *ndr, const ch if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "eventlog_GetOldestRecord"); ndr->depth++; + ndr_print_ptr(ndr, "handle", r->in.handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "handle", r->in.handle); + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "eventlog_GetOldestRecord"); ndr->depth++; + ndr_print_ptr(ndr, "oldest_entry", r->out.oldest_entry); + ndr->depth++; + ndr_print_uint32(ndr, "oldest_entry", *r->out.oldest_entry); + ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; } diff --git a/source3/librpc/gen_ndr/srv_eventlog.c b/source3/librpc/gen_ndr/srv_eventlog.c index d9310a8fbb..fc94993cee 100644 --- a/source3/librpc/gen_ndr/srv_eventlog.c +++ b/source3/librpc/gen_ndr/srv_eventlog.c @@ -418,6 +418,13 @@ static bool api_eventlog_GetOldestRecord(pipes_struct *p) NDR_PRINT_IN_DEBUG(eventlog_GetOldestRecord, r); } + ZERO_STRUCT(r->out); + r->out.oldest_entry = talloc_zero(r, uint32_t); + if (r->out.oldest_entry == NULL) { + talloc_free(r); + return false; + } + r->out.result = _eventlog_GetOldestRecord(p, r); if (p->rng_fault_state) { -- cgit