summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-01-24 03:30:48 +0100
committerGünther Deschner <gd@samba.org>2009-01-24 03:33:22 +0100
commit4cac1da142aec103f1022aedeb068d9cc94c7f4e (patch)
tree3d347f7fedfaab2eef4a69bcc031c714befcd0ca /librpc
parentb57c37d6aec28ef93c5d47aa3b20382bd8679361 (diff)
downloadsamba-4cac1da142aec103f1022aedeb068d9cc94c7f4e.tar.gz
samba-4cac1da142aec103f1022aedeb068d9cc94c7f4e.tar.bz2
samba-4cac1da142aec103f1022aedeb068d9cc94c7f4e.zip
s3: re-run make samba3-idl.
Guenther
Diffstat (limited to 'librpc')
-rw-r--r--librpc/gen_ndr/cli_eventlog.c157
-rw-r--r--librpc/gen_ndr/cli_eventlog.h62
-rw-r--r--librpc/gen_ndr/eventlog.h86
-rw-r--r--librpc/gen_ndr/ndr_eventlog.c908
-rw-r--r--librpc/gen_ndr/ndr_eventlog.h5
-rw-r--r--librpc/gen_ndr/srv_eventlog.c146
-rw-r--r--librpc/gen_ndr/srv_eventlog.h2
7 files changed, 1352 insertions, 14 deletions
diff --git a/librpc/gen_ndr/cli_eventlog.c b/librpc/gen_ndr/cli_eventlog.c
index 2f4b9f21af..6b084d2217 100644
--- a/librpc/gen_ndr/cli_eventlog.c
+++ b/librpc/gen_ndr/cli_eventlog.c
@@ -47,12 +47,16 @@ NTSTATUS rpccli_eventlog_ClearEventLogW(struct rpc_pipe_client *cli,
}
NTSTATUS rpccli_eventlog_BackupEventLogW(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx)
+ TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle /* [in] [ref] */,
+ struct lsa_String *backup_filename /* [in] [ref] */)
{
struct eventlog_BackupEventLogW r;
NTSTATUS status;
/* In parameters */
+ r.in.handle = handle;
+ r.in.backup_filename = backup_filename;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(eventlog_BackupEventLogW, &r);
@@ -122,12 +126,14 @@ NTSTATUS rpccli_eventlog_CloseEventLog(struct rpc_pipe_client *cli,
}
NTSTATUS rpccli_eventlog_DeregisterEventSource(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx)
+ TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle /* [in,out] [ref] */)
{
struct eventlog_DeregisterEventSource r;
NTSTATUS status;
/* In parameters */
+ r.in.handle = handle;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(eventlog_DeregisterEventSource, &r);
@@ -152,6 +158,7 @@ NTSTATUS rpccli_eventlog_DeregisterEventSource(struct rpc_pipe_client *cli,
}
/* Return variables */
+ *handle = *r.out.handle;
/* Return result */
return r.out.result;
@@ -322,12 +329,23 @@ NTSTATUS rpccli_eventlog_OpenEventLogW(struct rpc_pipe_client *cli,
}
NTSTATUS rpccli_eventlog_RegisterEventSourceW(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx)
+ TALLOC_CTX *mem_ctx,
+ struct eventlog_OpenUnknown0 *unknown0 /* [in] [unique] */,
+ struct lsa_String *module_name /* [in] [ref] */,
+ struct lsa_String *reg_module_name /* [in] [ref] */,
+ uint32_t major_version /* [in] */,
+ uint32_t minor_version /* [in] */,
+ struct policy_handle *log_handle /* [out] [ref] */)
{
struct eventlog_RegisterEventSourceW r;
NTSTATUS status;
/* In parameters */
+ r.in.unknown0 = unknown0;
+ r.in.module_name = module_name;
+ r.in.reg_module_name = reg_module_name;
+ r.in.major_version = major_version;
+ r.in.minor_version = minor_version;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(eventlog_RegisterEventSourceW, &r);
@@ -352,18 +370,28 @@ NTSTATUS rpccli_eventlog_RegisterEventSourceW(struct rpc_pipe_client *cli,
}
/* Return variables */
+ *log_handle = *r.out.log_handle;
/* Return result */
return r.out.result;
}
NTSTATUS rpccli_eventlog_OpenBackupEventLogW(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx)
+ TALLOC_CTX *mem_ctx,
+ struct eventlog_OpenUnknown0 *unknown0 /* [in] [unique] */,
+ struct lsa_String *backup_logname /* [in] [ref] */,
+ uint32_t major_version /* [in] */,
+ uint32_t minor_version /* [in] */,
+ struct policy_handle *handle /* [out] [ref] */)
{
struct eventlog_OpenBackupEventLogW r;
NTSTATUS status;
/* In parameters */
+ r.in.unknown0 = unknown0;
+ r.in.backup_logname = backup_logname;
+ r.in.major_version = major_version;
+ r.in.minor_version = minor_version;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(eventlog_OpenBackupEventLogW, &r);
@@ -388,6 +416,7 @@ NTSTATUS rpccli_eventlog_OpenBackupEventLogW(struct rpc_pipe_client *cli,
}
/* Return variables */
+ *handle = *r.out.handle;
/* Return result */
return r.out.result;
@@ -444,12 +473,40 @@ NTSTATUS rpccli_eventlog_ReadEventLogW(struct rpc_pipe_client *cli,
}
NTSTATUS rpccli_eventlog_ReportEventW(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx)
+ TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle /* [in] [ref] */,
+ time_t timestamp /* [in] */,
+ enum eventlogEventTypes event_type /* [in] */,
+ uint16_t event_category /* [in] */,
+ uint32_t event_id /* [in] */,
+ uint16_t num_of_strings /* [in] [range(0,256)] */,
+ uint32_t data_size /* [in] [range(0,0x3FFFF)] */,
+ struct lsa_String *servername /* [in] [ref] */,
+ struct dom_sid *user_sid /* [in] [unique] */,
+ struct lsa_String **strings /* [in] [unique,size_is(num_of_strings)] */,
+ uint8_t *data /* [in] [unique,size_is(data_size)] */,
+ uint16_t flags /* [in] */,
+ uint32_t *record_number /* [in,out] [unique] */,
+ time_t *time_written /* [in,out] [unique] */)
{
struct eventlog_ReportEventW r;
NTSTATUS status;
/* In parameters */
+ r.in.handle = handle;
+ r.in.timestamp = timestamp;
+ r.in.event_type = event_type;
+ r.in.event_category = event_category;
+ r.in.event_id = event_id;
+ r.in.num_of_strings = num_of_strings;
+ r.in.data_size = data_size;
+ r.in.servername = servername;
+ r.in.user_sid = user_sid;
+ r.in.strings = strings;
+ r.in.data = data;
+ r.in.flags = flags;
+ r.in.record_number = record_number;
+ r.in.time_written = time_written;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(eventlog_ReportEventW, &r);
@@ -474,6 +531,12 @@ NTSTATUS rpccli_eventlog_ReportEventW(struct rpc_pipe_client *cli,
}
/* Return variables */
+ if (record_number && r.out.record_number) {
+ *record_number = *r.out.record_number;
+ }
+ if (time_written && r.out.time_written) {
+ *time_written = *r.out.time_written;
+ }
/* Return result */
return r.out.result;
@@ -840,12 +903,20 @@ NTSTATUS rpccli_eventlog_WriteClusterEvents(struct rpc_pipe_client *cli,
}
NTSTATUS rpccli_eventlog_GetLogIntormation(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx)
+ TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle /* [in] [ref] */,
+ uint32_t level /* [in] */,
+ uint8_t *buffer /* [out] [ref,size_is(buf_size)] */,
+ uint32_t buf_size /* [in] [range(0,1024)] */,
+ uint32_t *bytes_needed /* [out] [ref] */)
{
struct eventlog_GetLogIntormation r;
NTSTATUS status;
/* In parameters */
+ r.in.handle = handle;
+ r.in.level = level;
+ r.in.buf_size = buf_size;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(eventlog_GetLogIntormation, &r);
@@ -870,6 +941,8 @@ NTSTATUS rpccli_eventlog_GetLogIntormation(struct rpc_pipe_client *cli,
}
/* Return variables */
+ memcpy(buffer, r.out.buffer, r.in.buf_size * sizeof(*buffer));
+ *bytes_needed = *r.out.bytes_needed;
/* Return result */
return r.out.result;
@@ -913,3 +986,75 @@ NTSTATUS rpccli_eventlog_FlushEventLog(struct rpc_pipe_client *cli,
return r.out.result;
}
+NTSTATUS rpccli_eventlog_ReportEventAndSourceW(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle /* [in] [ref] */,
+ time_t timestamp /* [in] */,
+ enum eventlogEventTypes event_type /* [in] */,
+ uint16_t event_category /* [in] */,
+ uint32_t event_id /* [in] */,
+ struct lsa_String *sourcename /* [in] [ref] */,
+ uint16_t num_of_strings /* [in] [range(0,256)] */,
+ uint32_t data_size /* [in] [range(0,0x3FFFF)] */,
+ struct lsa_String *servername /* [in] [ref] */,
+ struct dom_sid *user_sid /* [in] [unique] */,
+ struct lsa_String **strings /* [in] [unique,size_is(num_of_strings)] */,
+ uint8_t *data /* [in] [unique,size_is(data_size)] */,
+ uint16_t flags /* [in] */,
+ uint32_t *record_number /* [in,out] [unique] */,
+ time_t *time_written /* [in,out] [unique] */)
+{
+ struct eventlog_ReportEventAndSourceW r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.handle = handle;
+ r.in.timestamp = timestamp;
+ r.in.event_type = event_type;
+ r.in.event_category = event_category;
+ r.in.event_id = event_id;
+ r.in.sourcename = sourcename;
+ r.in.num_of_strings = num_of_strings;
+ r.in.data_size = data_size;
+ r.in.servername = servername;
+ r.in.user_sid = user_sid;
+ r.in.strings = strings;
+ r.in.data = data;
+ r.in.flags = flags;
+ r.in.record_number = record_number;
+ r.in.time_written = time_written;
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(eventlog_ReportEventAndSourceW, &r);
+ }
+
+ status = cli->dispatch(cli,
+ mem_ctx,
+ &ndr_table_eventlog,
+ NDR_EVENTLOG_REPORTEVENTANDSOURCEW,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(eventlog_ReportEventAndSourceW, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ if (record_number && r.out.record_number) {
+ *record_number = *r.out.record_number;
+ }
+ if (time_written && r.out.time_written) {
+ *time_written = *r.out.time_written;
+ }
+
+ /* Return result */
+ return r.out.result;
+}
+
diff --git a/librpc/gen_ndr/cli_eventlog.h b/librpc/gen_ndr/cli_eventlog.h
index a1360cbc16..ae5544daf3 100644
--- a/librpc/gen_ndr/cli_eventlog.h
+++ b/librpc/gen_ndr/cli_eventlog.h
@@ -6,12 +6,15 @@ NTSTATUS rpccli_eventlog_ClearEventLogW(struct rpc_pipe_client *cli,
struct policy_handle *handle /* [in] [ref] */,
struct lsa_String *backupfile /* [in] [unique] */);
NTSTATUS rpccli_eventlog_BackupEventLogW(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx);
+ TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle /* [in] [ref] */,
+ struct lsa_String *backup_filename /* [in] [ref] */);
NTSTATUS rpccli_eventlog_CloseEventLog(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in,out] [ref] */);
NTSTATUS rpccli_eventlog_DeregisterEventSource(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx);
+ TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle /* [in,out] [ref] */);
NTSTATUS rpccli_eventlog_GetNumRecords(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
@@ -31,9 +34,20 @@ NTSTATUS rpccli_eventlog_OpenEventLogW(struct rpc_pipe_client *cli,
uint32_t minor_version /* [in] */,
struct policy_handle *handle /* [out] [ref] */);
NTSTATUS rpccli_eventlog_RegisterEventSourceW(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx);
+ TALLOC_CTX *mem_ctx,
+ struct eventlog_OpenUnknown0 *unknown0 /* [in] [unique] */,
+ struct lsa_String *module_name /* [in] [ref] */,
+ struct lsa_String *reg_module_name /* [in] [ref] */,
+ uint32_t major_version /* [in] */,
+ uint32_t minor_version /* [in] */,
+ struct policy_handle *log_handle /* [out] [ref] */);
NTSTATUS rpccli_eventlog_OpenBackupEventLogW(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx);
+ TALLOC_CTX *mem_ctx,
+ struct eventlog_OpenUnknown0 *unknown0 /* [in] [unique] */,
+ struct lsa_String *backup_logname /* [in] [ref] */,
+ uint32_t major_version /* [in] */,
+ uint32_t minor_version /* [in] */,
+ struct policy_handle *handle /* [out] [ref] */);
NTSTATUS rpccli_eventlog_ReadEventLogW(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
@@ -44,7 +58,21 @@ NTSTATUS rpccli_eventlog_ReadEventLogW(struct rpc_pipe_client *cli,
uint32_t *sent_size /* [out] [ref] */,
uint32_t *real_size /* [out] [ref] */);
NTSTATUS rpccli_eventlog_ReportEventW(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx);
+ TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle /* [in] [ref] */,
+ time_t timestamp /* [in] */,
+ enum eventlogEventTypes event_type /* [in] */,
+ uint16_t event_category /* [in] */,
+ uint32_t event_id /* [in] */,
+ uint16_t num_of_strings /* [in] [range(0,256)] */,
+ uint32_t data_size /* [in] [range(0,0x3FFFF)] */,
+ struct lsa_String *servername /* [in] [ref] */,
+ struct dom_sid *user_sid /* [in] [unique] */,
+ struct lsa_String **strings /* [in] [unique,size_is(num_of_strings)] */,
+ uint8_t *data /* [in] [unique,size_is(data_size)] */,
+ uint16_t flags /* [in] */,
+ uint32_t *record_number /* [in,out] [unique] */,
+ time_t *time_written /* [in,out] [unique] */);
NTSTATUS rpccli_eventlog_ClearEventLogA(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_eventlog_BackupEventLogA(struct rpc_pipe_client *cli,
@@ -66,8 +94,30 @@ NTSTATUS rpccli_eventlog_DeregisterClusterSvc(struct rpc_pipe_client *cli,
NTSTATUS rpccli_eventlog_WriteClusterEvents(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_eventlog_GetLogIntormation(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx);
+ TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle /* [in] [ref] */,
+ uint32_t level /* [in] */,
+ uint8_t *buffer /* [out] [ref,size_is(buf_size)] */,
+ uint32_t buf_size /* [in] [range(0,1024)] */,
+ uint32_t *bytes_needed /* [out] [ref] */);
NTSTATUS rpccli_eventlog_FlushEventLog(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */);
+NTSTATUS rpccli_eventlog_ReportEventAndSourceW(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle /* [in] [ref] */,
+ time_t timestamp /* [in] */,
+ enum eventlogEventTypes event_type /* [in] */,
+ uint16_t event_category /* [in] */,
+ uint32_t event_id /* [in] */,
+ struct lsa_String *sourcename /* [in] [ref] */,
+ uint16_t num_of_strings /* [in] [range(0,256)] */,
+ uint32_t data_size /* [in] [range(0,0x3FFFF)] */,
+ struct lsa_String *servername /* [in] [ref] */,
+ struct dom_sid *user_sid /* [in] [unique] */,
+ struct lsa_String **strings /* [in] [unique,size_is(num_of_strings)] */,
+ uint8_t *data /* [in] [unique,size_is(data_size)] */,
+ uint16_t flags /* [in] */,
+ uint32_t *record_number /* [in,out] [unique] */,
+ time_t *time_written /* [in,out] [unique] */);
#endif /* __CLI_EVENTLOG__ */
diff --git a/librpc/gen_ndr/eventlog.h b/librpc/gen_ndr/eventlog.h
index 9c9a2ed218..8dc0d0d146 100644
--- a/librpc/gen_ndr/eventlog.h
+++ b/librpc/gen_ndr/eventlog.h
@@ -65,6 +65,10 @@ struct eventlog_Record {
uint32_t size2;/* [value(size)] */
}/* [public,flag(LIBNDR_FLAG_NOALIGN)] */;
+struct EVENTLOG_FULL_INFORMATION {
+ uint32_t full;
+};
+
struct eventlog_ClearEventLogW {
struct {
@@ -81,6 +85,11 @@ struct eventlog_ClearEventLogW {
struct eventlog_BackupEventLogW {
struct {
+ struct policy_handle *handle;/* [ref] */
+ struct lsa_String *backup_filename;/* [ref] */
+ } in;
+
+ struct {
NTSTATUS result;
} out;
@@ -102,6 +111,11 @@ struct eventlog_CloseEventLog {
struct eventlog_DeregisterEventSource {
struct {
+ struct policy_handle *handle;/* [ref] */
+ } in;
+
+ struct {
+ struct policy_handle *handle;/* [ref] */
NTSTATUS result;
} out;
@@ -161,6 +175,15 @@ struct eventlog_OpenEventLogW {
struct eventlog_RegisterEventSourceW {
struct {
+ struct eventlog_OpenUnknown0 *unknown0;/* [unique] */
+ struct lsa_String *module_name;/* [ref] */
+ struct lsa_String *reg_module_name;/* [ref] */
+ uint32_t major_version;
+ uint32_t minor_version;
+ } in;
+
+ struct {
+ struct policy_handle *log_handle;/* [ref] */
NTSTATUS result;
} out;
@@ -169,6 +192,14 @@ struct eventlog_RegisterEventSourceW {
struct eventlog_OpenBackupEventLogW {
struct {
+ struct eventlog_OpenUnknown0 *unknown0;/* [unique] */
+ struct lsa_String *backup_logname;/* [ref] */
+ uint32_t major_version;
+ uint32_t minor_version;
+ } in;
+
+ struct {
+ struct policy_handle *handle;/* [ref] */
NTSTATUS result;
} out;
@@ -195,6 +226,25 @@ struct eventlog_ReadEventLogW {
struct eventlog_ReportEventW {
struct {
+ struct policy_handle *handle;/* [ref] */
+ time_t timestamp;
+ enum eventlogEventTypes event_type;
+ uint16_t event_category;
+ uint32_t event_id;
+ uint16_t num_of_strings;/* [range(0,256)] */
+ uint32_t data_size;/* [range(0,0x3FFFF)] */
+ struct lsa_String *servername;/* [ref] */
+ struct dom_sid *user_sid;/* [unique] */
+ struct lsa_String **strings;/* [unique,size_is(num_of_strings)] */
+ uint8_t *data;/* [unique,size_is(data_size)] */
+ uint16_t flags;
+ uint32_t *record_number;/* [unique] */
+ time_t *time_written;/* [unique] */
+ } in;
+
+ struct {
+ uint32_t *record_number;/* [unique] */
+ time_t *time_written;/* [unique] */
NTSTATUS result;
} out;
@@ -283,6 +333,14 @@ struct eventlog_WriteClusterEvents {
struct eventlog_GetLogIntormation {
struct {
+ struct policy_handle *handle;/* [ref] */
+ uint32_t level;
+ uint32_t buf_size;/* [range(0,1024)] */
+ } in;
+
+ struct {
+ uint8_t *buffer;/* [ref,size_is(buf_size)] */
+ uint32_t *bytes_needed;/* [ref] */
NTSTATUS result;
} out;
@@ -300,4 +358,32 @@ struct eventlog_FlushEventLog {
};
+
+struct eventlog_ReportEventAndSourceW {
+ struct {
+ struct policy_handle *handle;/* [ref] */
+ time_t timestamp;
+ enum eventlogEventTypes event_type;
+ uint16_t event_category;
+ uint32_t event_id;
+ struct lsa_String *sourcename;/* [ref] */
+ uint16_t num_of_strings;/* [range(0,256)] */
+ uint32_t data_size;/* [range(0,0x3FFFF)] */
+ struct lsa_String *servername;/* [ref] */
+ struct dom_sid *user_sid;/* [unique] */
+ struct lsa_String **strings;/* [unique,size_is(num_of_strings)] */
+ uint8_t *data;/* [unique,size_is(data_size)] */
+ uint16_t flags;
+ uint32_t *record_number;/* [unique] */
+ time_t *time_written;/* [unique] */
+ } in;
+
+ struct {
+ uint32_t *record_number;/* [unique] */
+ time_t *time_written;/* [unique] */
+ NTSTATUS result;
+ } out;
+
+};
+
#endif /* _HEADER_eventlog */
diff --git a/librpc/gen_ndr/ndr_eventlog.c b/librpc/gen_ndr/ndr_eventlog.c
index ddc93f910b..938f0db8eb 100644
--- a/librpc/gen_ndr/ndr_eventlog.c
+++ b/librpc/gen_ndr/ndr_eventlog.c
@@ -371,6 +371,14 @@ _PUBLIC_ void ndr_print_eventlog_ClearEventLogW(struct ndr_print *ndr, const cha
static enum ndr_err_code ndr_push_eventlog_BackupEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_BackupEventLogW *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, r->in.handle));
+ if (r->in.backup_filename == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backup_filename));
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
@@ -380,7 +388,23 @@ static enum ndr_err_code ndr_push_eventlog_BackupEventLogW(struct ndr_push *ndr,
static enum ndr_err_code ndr_pull_eventlog_BackupEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_BackupEventLogW *r)
{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_backup_filename_0;
if (flags & NDR_IN) {
+ 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, r->in.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.backup_filename);
+ }
+ _mem_save_backup_filename_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.backup_filename, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backup_filename));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_backup_filename_0, LIBNDR_FLAG_REF_ALLOC);
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
@@ -398,6 +422,14 @@ _PUBLIC_ void ndr_print_eventlog_BackupEventLogW(struct ndr_print *ndr, const ch
if (flags & NDR_IN) {
ndr_print_struct(ndr, "in", "eventlog_BackupEventLogW");
ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "backup_filename", r->in.backup_filename);
+ ndr->depth++;
+ ndr_print_lsa_String(ndr, "backup_filename", r->in.backup_filename);
+ ndr->depth--;
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -488,8 +520,16 @@ _PUBLIC_ void ndr_print_eventlog_CloseEventLog(struct ndr_print *ndr, const char
static enum ndr_err_code ndr_push_eventlog_DeregisterEventSource(struct ndr_push *ndr, int flags, const struct eventlog_DeregisterEventSource *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, r->in.handle));
}
if (flags & NDR_OUT) {
+ if (r->out.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -497,9 +537,28 @@ static enum ndr_err_code ndr_push_eventlog_DeregisterEventSource(struct ndr_push
static enum ndr_err_code ndr_pull_eventlog_DeregisterEventSource(struct ndr_pull *ndr, int flags, struct eventlog_DeregisterEventSource *r)
{
+ TALLOC_CTX *_mem_save_handle_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, r->in.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.handle);
+ *r->out.handle = *r->in.handle;
}
if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -515,11 +574,19 @@ _PUBLIC_ void ndr_print_eventlog_DeregisterEventSource(struct ndr_print *ndr, co
if (flags & NDR_IN) {
ndr_print_struct(ndr, "in", "eventlog_DeregisterEventSource");
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_DeregisterEventSource");
ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->out.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->out.handle);
+ ndr->depth--;
ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;
}
@@ -847,8 +914,26 @@ _PUBLIC_ void ndr_print_eventlog_OpenEventLogW(struct ndr_print *ndr, const char
static enum ndr_err_code ndr_push_eventlog_RegisterEventSourceW(struct ndr_push *ndr, int flags, const struct eventlog_RegisterEventSourceW *r)
{
if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown0));
+ if (r->in.unknown0) {
+ NDR_CHECK(ndr_push_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0));
+ }
+ if (r->in.module_name == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.module_name));
+ if (r->in.reg_module_name == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.reg_module_name));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.major_version));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.minor_version));
}
if (flags & NDR_OUT) {
+ if (r->out.log_handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.log_handle));
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -856,9 +941,53 @@ static enum ndr_err_code ndr_push_eventlog_RegisterEventSourceW(struct ndr_push
static enum ndr_err_code ndr_pull_eventlog_RegisterEventSourceW(struct ndr_pull *ndr, int flags, struct eventlog_RegisterEventSourceW *r)
{
+ uint32_t _ptr_unknown0;
+ TALLOC_CTX *_mem_save_unknown0_0;
+ TALLOC_CTX *_mem_save_module_name_0;
+ TALLOC_CTX *_mem_save_reg_module_name_0;
+ TALLOC_CTX *_mem_save_log_handle_0;
if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown0));
+ if (_ptr_unknown0) {
+ NDR_PULL_ALLOC(ndr, r->in.unknown0);
+ } else {
+ r->in.unknown0 = NULL;
+ }
+ if (r->in.unknown0) {
+ _mem_save_unknown0_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown0, 0);
+ NDR_CHECK(ndr_pull_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown0_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.module_name);
+ }
+ _mem_save_module_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.module_name, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.module_name));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_module_name_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.reg_module_name);
+ }
+ _mem_save_reg_module_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.reg_module_name, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.reg_module_name));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reg_module_name_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.major_version));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.minor_version));
+ NDR_PULL_ALLOC(ndr, r->out.log_handle);
+ ZERO_STRUCTP(r->out.log_handle);
}
if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.log_handle);
+ }
+ _mem_save_log_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.log_handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.log_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_log_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -874,11 +1003,31 @@ _PUBLIC_ void ndr_print_eventlog_RegisterEventSourceW(struct ndr_print *ndr, con
if (flags & NDR_IN) {
ndr_print_struct(ndr, "in", "eventlog_RegisterEventSourceW");
ndr->depth++;
+ ndr_print_ptr(ndr, "unknown0", r->in.unknown0);
+ ndr->depth++;
+ if (r->in.unknown0) {
+ ndr_print_eventlog_OpenUnknown0(ndr, "unknown0", r->in.unknown0);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "module_name", r->in.module_name);
+ ndr->depth++;
+ ndr_print_lsa_String(ndr, "module_name", r->in.module_name);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "reg_module_name", r->in.reg_module_name);
+ ndr->depth++;
+ ndr_print_lsa_String(ndr, "reg_module_name", r->in.reg_module_name);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "major_version", r->in.major_version);
+ ndr_print_uint32(ndr, "minor_version", r->in.minor_version);
ndr->depth--;
}
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "eventlog_RegisterEventSourceW");
ndr->depth++;
+ ndr_print_ptr(ndr, "log_handle", r->out.log_handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "log_handle", r->out.log_handle);
+ ndr->depth--;
ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;
}
@@ -888,8 +1037,22 @@ _PUBLIC_ void ndr_print_eventlog_RegisterEventSourceW(struct ndr_print *ndr, con
static enum ndr_err_code ndr_push_eventlog_OpenBackupEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_OpenBackupEventLogW *r)
{
if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown0));
+ if (r->in.unknown0) {
+ NDR_CHECK(ndr_push_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0));
+ }
+ if (r->in.backup_logname == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backup_logname));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.major_version));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.minor_version));
}
if (flags & NDR_OUT) {
+ if (r->out.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -897,9 +1060,45 @@ static enum ndr_err_code ndr_push_eventlog_OpenBackupEventLogW(struct ndr_push *
static enum ndr_err_code ndr_pull_eventlog_OpenBackupEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_OpenBackupEventLogW *r)
{
+ uint32_t _ptr_unknown0;
+ TALLOC_CTX *_mem_save_unknown0_0;
+ TALLOC_CTX *_mem_save_backup_logname_0;
+ TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown0));
+ if (_ptr_unknown0) {
+ NDR_PULL_ALLOC(ndr, r->in.unknown0);
+ } else {
+ r->in.unknown0 = NULL;
+ }
+ if (r->in.unknown0) {
+ _mem_save_unknown0_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown0, 0);
+ NDR_CHECK(ndr_pull_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown0_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.backup_logname);
+ }
+ _mem_save_backup_logname_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.backup_logname, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backup_logname));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_backup_logname_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.major_version));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.minor_version));
+ NDR_PULL_ALLOC(ndr, r->out.handle);
+ ZERO_STRUCTP(r->out.handle);
}
if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -915,11 +1114,27 @@ _PUBLIC_ void ndr_print_eventlog_OpenBackupEventLogW(struct ndr_print *ndr, cons
if (flags & NDR_IN) {
ndr_print_struct(ndr, "in", "eventlog_OpenBackupEventLogW");
ndr->depth++;
+ ndr_print_ptr(ndr, "unknown0", r->in.unknown0);
+ ndr->depth++;
+ if (r->in.unknown0) {
+ ndr_print_eventlog_OpenUnknown0(ndr, "unknown0", r->in.unknown0);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "backup_logname", r->in.backup_logname);
+ ndr->depth++;
+ ndr_print_lsa_String(ndr, "backup_logname", r->in.backup_logname);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "major_version", r->in.major_version);
+ ndr_print_uint32(ndr, "minor_version", r->in.minor_version);
ndr->depth--;
}
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "eventlog_OpenBackupEventLogW");
ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->out.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->out.handle);
+ ndr->depth--;
ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;
}
@@ -1054,9 +1269,62 @@ _PUBLIC_ void ndr_print_eventlog_ReadEventLogW(struct ndr_print *ndr, const char
static enum ndr_err_code ndr_push_eventlog_ReportEventW(struct ndr_push *ndr, int flags, const struct eventlog_ReportEventW *r)
{
+ uint32_t cntr_strings_1;
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, r->in.handle));
+ NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->in.timestamp));
+ NDR_CHECK(ndr_push_eventlogEventTypes(ndr, NDR_SCALARS, r->in.event_type));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.event_category));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.event_id));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.num_of_strings));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.data_size));
+ if (r->in.servername == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user_sid));
+ if (r->in.user_sid) {
+ NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.user_sid));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.strings));
+ if (r->in.strings) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_of_strings));
+ for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
+ }
+ for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.strings[cntr_strings_1]));
+ if (r->in.strings[cntr_strings_1]) {
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.strings[cntr_strings_1]));
+ }
+ }
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data));
+ if (r->in.data) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.data_size));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, r->in.data_size));
+ }
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.flags));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.record_number));
+ if (r->in.record_number) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.record_number));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.time_written));
+ if (r->in.time_written) {
+ NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, *r->in.time_written));
+ }
}
if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.record_number));
+ if (r->out.record_number) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.record_number));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.time_written));
+ if (r->out.time_written) {
+ NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, *r->out.time_written));
+ }
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -1064,9 +1332,165 @@ static enum ndr_err_code ndr_push_eventlog_ReportEventW(struct ndr_push *ndr, in
static enum ndr_err_code ndr_pull_eventlog_ReportEventW(struct ndr_pull *ndr, int flags, struct eventlog_ReportEventW *r)
{
+ uint32_t _ptr_user_sid;
+ uint32_t _ptr_strings;
+ uint32_t cntr_strings_1;
+ uint32_t _ptr_data;
+ uint32_t _ptr_record_number;
+ uint32_t _ptr_time_written;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_servername_0;
+ TALLOC_CTX *_mem_save_user_sid_0;
+ TALLOC_CTX *_mem_save_strings_0;
+ TALLOC_CTX *_mem_save_strings_1;
+ TALLOC_CTX *_mem_save_strings_2;
+ TALLOC_CTX *_mem_save_data_0;
+ TALLOC_CTX *_mem_save_record_number_0;
+ TALLOC_CTX *_mem_save_time_written_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, r->in.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->in.timestamp));
+ NDR_CHECK(ndr_pull_eventlogEventTypes(ndr, NDR_SCALARS, &r->in.event_type));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.event_category));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.event_id));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.num_of_strings));
+ if (r->in.num_of_strings > 256) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.data_size));
+ if (r->in.data_size > 0x3FFFF) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.servername);
+ }
+ _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_sid));
+ if (_ptr_user_sid) {
+ NDR_PULL_ALLOC(ndr, r->in.user_sid);
+ } else {
+ r->in.user_sid = NULL;
+ }
+ if (r->in.user_sid) {
+ _mem_save_user_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.user_sid, 0);
+ NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.user_sid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_sid_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_strings));
+ if (_ptr_strings) {
+ NDR_PULL_ALLOC(ndr, r->in.strings);
+ } else {
+ r->in.strings = NULL;
+ }
+ if (r->in.strings) {
+ _mem_save_strings_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.strings, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.strings));
+ NDR_PULL_ALLOC_N(ndr, r->in.strings, ndr_get_array_size(ndr, &r->in.strings));
+ _mem_save_strings_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.strings, 0);
+ for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
+ }
+ for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_strings));
+ if (_ptr_strings) {
+ NDR_PULL_ALLOC(ndr, r->in.strings[cntr_strings_1]);
+ } else {
+ r->in.strings[cntr_strings_1] = NULL;
+ }
+ if (r->in.strings[cntr_strings_1]) {
+ _mem_save_strings_2 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.strings[cntr_strings_1], 0);
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.strings[cntr_strings_1]));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_2, 0);
+ }
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
+ if (_ptr_data) {
+ NDR_PULL_ALLOC(ndr, r->in.data);
+ } else {
+ r->in.data = NULL;
+ }
+ if (r->in.data) {
+ _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.data, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.data));
+ NDR_PULL_ALLOC_N(ndr, r->in.data, ndr_get_array_size(ndr, &r->in.data));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.data, ndr_get_array_size(ndr, &r->in.data)));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.flags));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_record_number));
+ if (_ptr_record_number) {
+ NDR_PULL_ALLOC(ndr, r->in.record_number);
+ } else {
+ r->in.record_number = NULL;
+ }
+ if (r->in.record_number) {
+ _mem_save_record_number_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.record_number, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.record_number));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_record_number_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_time_written));
+ if (_ptr_time_written) {
+ NDR_PULL_ALLOC(ndr, r->in.time_written);
+ } else {
+ r->in.time_written = NULL;
+ }
+ if (r->in.time_written) {
+ _mem_save_time_written_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.time_written, 0);
+ NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, r->in.time_written));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_time_written_0, 0);
+ }
+ if (r->in.strings) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.strings, r->in.num_of_strings));
+ }
+ if (r->in.data) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.data, r->in.data_size));
+ }
}
if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_record_number));
+ if (_ptr_record_number) {
+ NDR_PULL_ALLOC(ndr, r->out.record_number);
+ } else {
+ r->out.record_number = NULL;
+ }
+ if (r->out.record_number) {
+ _mem_save_record_number_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.record_number, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.record_number));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_record_number_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_time_written));
+ if (_ptr_time_written) {
+ NDR_PULL_ALLOC(ndr, r->out.time_written);
+ } else {
+ r->out.time_written = NULL;
+ }
+ if (r->out.time_written) {
+ _mem_save_time_written_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.time_written, 0);
+ NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, r->out.time_written));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_time_written_0, 0);
+ }
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -1074,6 +1498,7 @@ static enum ndr_err_code ndr_pull_eventlog_ReportEventW(struct ndr_pull *ndr, in
_PUBLIC_ void ndr_print_eventlog_ReportEventW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReportEventW *r)
{
+ uint32_t cntr_strings_1;
ndr_print_struct(ndr, name, "eventlog_ReportEventW");
ndr->depth++;
if (flags & NDR_SET_VALUES) {
@@ -1082,11 +1507,82 @@ _PUBLIC_ void ndr_print_eventlog_ReportEventW(struct ndr_print *ndr, const char
if (flags & NDR_IN) {
ndr_print_struct(ndr, "in", "eventlog_ReportEventW");
ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_time_t(ndr, "timestamp", r->in.timestamp);
+ ndr_print_eventlogEventTypes(ndr, "event_type", r->in.event_type);
+ ndr_print_uint16(ndr, "event_category", r->in.event_category);
+ ndr_print_uint32(ndr, "event_id", r->in.event_id);
+ ndr_print_uint16(ndr, "num_of_strings", r->in.num_of_strings);
+ ndr_print_uint32(ndr, "data_size", r->in.data_size);
+ ndr_print_ptr(ndr, "servername", r->in.servername);
+ ndr->depth++;
+ ndr_print_lsa_String(ndr, "servername", r->in.servername);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "user_sid", r->in.user_sid);
+ ndr->depth++;
+ if (r->in.user_sid) {
+ ndr_print_dom_sid(ndr, "user_sid", r->in.user_sid);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "strings", r->in.strings);
+ ndr->depth++;
+ if (r->in.strings) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "strings", (int)r->in.num_of_strings);
+ ndr->depth++;
+ for (cntr_strings_1=0;cntr_strings_1<r->in.num_of_strings;cntr_strings_1++) {
+ char *idx_1=NULL;
+ if (asprintf(&idx_1, "[%d]", cntr_strings_1) != -1) {
+ ndr_print_ptr(ndr, "strings", r->in.strings[cntr_strings_1]);
+ ndr->depth++;
+ if (r->in.strings[cntr_strings_1]) {
+ ndr_print_lsa_String(ndr, "strings", r->in.strings[cntr_strings_1]);
+ }
+ ndr->depth--;
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "data", r->in.data);
+ ndr->depth++;
+ if (r->in.data) {
+ ndr_print_array_uint8(ndr, "data", r->in.data, r->in.data_size);
+ }
+ ndr->depth--;
+ ndr_print_uint16(ndr, "flags", r->in.flags);
+ ndr_print_ptr(ndr, "record_number", r->in.record_number);
+ ndr->depth++;
+ if (r->in.record_number) {
+ ndr_print_uint32(ndr, "record_number", *r->in.record_number);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "time_written", r->in.time_written);
+ ndr->depth++;
+ if (r->in.time_written) {
+ ndr_print_time_t(ndr, "time_written", *r->in.time_written);
+ }
+ ndr->depth--;
ndr->depth--;
}
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "eventlog_ReportEventW");
ndr->depth++;
+ ndr_print_ptr(ndr, "record_number", r->out.record_number);
+ ndr->depth++;
+ if (r->out.record_number) {
+ ndr_print_uint32(ndr, "record_number", *r->out.record_number);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "time_written", r->out.time_written);
+ ndr->depth++;
+ if (r->out.time_written) {
+ ndr_print_time_t(ndr, "time_written", *r->out.time_written);
+ }
+ ndr->depth--;
ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;
}
@@ -1506,8 +2002,23 @@ _PUBLIC_ void ndr_print_eventlog_WriteClusterEvents(struct ndr_print *ndr, const
static enum ndr_err_code ndr_push_eventlog_GetLogIntormation(struct ndr_push *ndr, int flags, const struct eventlog_GetLogIntormation *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, r->in.handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
}
if (flags & NDR_OUT) {
+ 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->in.buf_size));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.buf_size));
+ if (r->out.bytes_needed == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -1515,10 +2026,45 @@ static enum ndr_err_code ndr_push_eventlog_GetLogIntormation(struct ndr_push *nd
static enum ndr_err_code ndr_pull_eventlog_GetLogIntormation(struct ndr_pull *ndr, int flags, struct eventlog_GetLogIntormation *r)
{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_bytes_needed_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, r->in.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
+ if (r->in.buf_size > 1024) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
+ NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.buf_size);
+ memset(CONST_DISCARD(struct eventlog_GetLogIntormation *,r->out.buffer), 0, (r->in.buf_size) * sizeof(*r->out.buffer));
+ NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ ZERO_STRUCTP(r->out.bytes_needed);
}
if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_array_size(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_size(ndr, &r->out.buffer)));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ }
+ _mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ if (r->out.buffer) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.buf_size));
+ }
}
return NDR_ERR_SUCCESS;
}
@@ -1533,11 +2079,25 @@ _PUBLIC_ void ndr_print_eventlog_GetLogIntormation(struct ndr_print *ndr, const
if (flags & NDR_IN) {
ndr_print_struct(ndr, "in", "eventlog_GetLogIntormation");
ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "level", r->in.level);
+ ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
ndr->depth--;
}
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "eventlog_GetLogIntormation");
ndr->depth++;
+ ndr_print_ptr(ndr, "buffer", r->out.buffer);
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.buf_size);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
+ ndr->depth--;
ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;
}
@@ -1601,6 +2161,344 @@ _PUBLIC_ void ndr_print_eventlog_FlushEventLog(struct ndr_print *ndr, const char
ndr->depth--;
}
+static enum ndr_err_code ndr_push_eventlog_ReportEventAndSourceW(struct ndr_push *ndr, int flags, const struct eventlog_ReportEventAndSourceW *r)
+{
+ uint32_t cntr_strings_1;
+ 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, r->in.handle));
+ NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->in.timestamp));
+ NDR_CHECK(ndr_push_eventlogEventTypes(ndr, NDR_SCALARS, r->in.event_type));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.event_category));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.event_id));
+ if (r->in.sourcename == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sourcename));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.num_of_strings));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.data_size));
+ if (r->in.servername == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user_sid));
+ if (r->in.user_sid) {
+ NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.user_sid));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.strings));
+ if (r->in.strings) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_of_strings));
+ for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
+ }
+ for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.strings[cntr_strings_1]));
+ if (r->in.strings[cntr_strings_1]) {
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.strings[cntr_strings_1]));
+ }
+ }
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data));
+ if (r->in.data) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.data_size));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, r->in.data_size));
+ }
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.flags));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.record_number));
+ if (r->in.record_number) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.record_number));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.time_written));
+ if (r->in.time_written) {
+ NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, *r->in.time_written));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.record_number));
+ if (r->out.record_number) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.record_number));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.time_written));
+ if (r->out.time_written) {
+ NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, *r->out.time_written));
+ }
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_eventlog_ReportEventAndSourceW(struct ndr_pull *ndr, int flags, struct eventlog_ReportEventAndSourceW *r)
+{
+ uint32_t _ptr_user_sid;
+ uint32_t _ptr_strings;
+ uint32_t cntr_strings_1;
+ uint32_t _ptr_data;
+ uint32_t _ptr_record_number;
+ uint32_t _ptr_time_written;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_sourcename_0;
+ TALLOC_CTX *_mem_save_servername_0;
+ TALLOC_CTX *_mem_save_user_sid_0;
+ TALLOC_CTX *_mem_save_strings_0;
+ TALLOC_CTX *_mem_save_strings_1;
+ TALLOC_CTX *_mem_save_strings_2;
+ TALLOC_CTX *_mem_save_data_0;
+ TALLOC_CTX *_mem_save_record_number_0;
+ TALLOC_CTX *_mem_save_time_written_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, r->in.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->in.timestamp));
+ NDR_CHECK(ndr_pull_eventlogEventTypes(ndr, NDR_SCALARS, &r->in.event_type));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.event_category));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.event_id));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.sourcename);
+ }
+ _mem_save_sourcename_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.sourcename, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sourcename));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sourcename_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.num_of_strings));
+ if (r->in.num_of_strings > 256) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.data_size));
+ if (r->in.data_size > 0x3FFFF) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.servername);
+ }
+ _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_sid));
+ if (_ptr_user_sid) {
+ NDR_PULL_ALLOC(ndr, r->in.user_sid);
+ } else {
+ r->in.user_sid = NULL;
+ }
+ if (r->in.user_sid) {
+ _mem_save_user_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.user_sid, 0);
+ NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.user_sid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_sid_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_strings));
+ if (_ptr_strings) {
+ NDR_PULL_ALLOC(ndr, r->in.strings);
+ } else {
+ r->in.strings = NULL;
+ }
+ if (r->in.strings) {
+ _mem_save_strings_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.strings, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.strings));
+ NDR_PULL_ALLOC_N(ndr, r->in.strings, ndr_get_array_size(ndr, &r->in.strings));
+ _mem_save_strings_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.strings, 0);
+ for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
+ }
+ for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_strings));
+ if (_ptr_strings) {
+ NDR_PULL_ALLOC(ndr, r->in.strings[cntr_strings_1]);
+ } else {
+ r->in.strings[cntr_strings_1] = NULL;
+ }
+ if (r->in.strings[cntr_strings_1]) {
+ _mem_save_strings_2 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.strings[cntr_strings_1], 0);
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.strings[cntr_strings_1]));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_2, 0);
+ }
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
+ if (_ptr_data) {
+ NDR_PULL_ALLOC(ndr, r->in.data);
+ } else {
+ r->in.data = NULL;
+ }
+ if (r->in.data) {
+ _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.data, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.data));
+ NDR_PULL_ALLOC_N(ndr, r->in.data, ndr_get_array_size(ndr, &r->in.data));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.data, ndr_get_array_size(ndr, &r->in.data)));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.flags));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_record_number));
+ if (_ptr_record_number) {
+ NDR_PULL_ALLOC(ndr, r->in.record_number);
+ } else {
+ r->in.record_number = NULL;
+ }
+ if (r->in.record_number) {
+ _mem_save_record_number_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.record_number, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.record_number));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_record_number_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_time_written));
+ if (_ptr_time_written) {
+ NDR_PULL_ALLOC(ndr, r->in.time_written);
+ } else {
+ r->in.time_written = NULL;
+ }
+ if (r->in.time_written) {
+ _mem_save_time_written_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.time_written, 0);
+ NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, r->in.time_written));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_time_written_0, 0);
+ }
+ if (r->in.strings) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.strings, r->in.num_of_strings));
+ }
+ if (r->in.data) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.data, r->in.data_size));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_record_number));
+ if (_ptr_record_number) {
+ NDR_PULL_ALLOC(ndr, r->out.record_number);
+ } else {
+ r->out.record_number = NULL;
+ }
+ if (r->out.record_number) {
+ _mem_save_record_number_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.record_number, 0);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.record_number));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_record_number_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_time_written));
+ if (_ptr_time_written) {
+ NDR_PULL_ALLOC(ndr, r->out.time_written);
+ } else {
+ r->out.time_written = NULL;
+ }
+ if (r->out.time_written) {
+ _mem_save_time_written_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.time_written, 0);
+ NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, r->out.time_written));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_time_written_0, 0);
+ }
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_eventlog_ReportEventAndSourceW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReportEventAndSourceW *r)
+{
+ uint32_t cntr_strings_1;
+ ndr_print_struct(ndr, name, "eventlog_ReportEventAndSourceW");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "eventlog_ReportEventAndSourceW");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_time_t(ndr, "timestamp", r->in.timestamp);
+ ndr_print_eventlogEventTypes(ndr, "event_type", r->in.event_type);
+ ndr_print_uint16(ndr, "event_category", r->in.event_category);
+ ndr_print_uint32(ndr, "event_id", r->in.event_id);
+ ndr_print_ptr(ndr, "sourcename", r->in.sourcename);
+ ndr->depth++;
+ ndr_print_lsa_String(ndr, "sourcename", r->in.sourcename);
+ ndr->depth--;
+ ndr_print_uint16(ndr, "num_of_strings", r->in.num_of_strings);
+ ndr_print_uint32(ndr, "data_size", r->in.data_size);
+ ndr_print_ptr(ndr, "servername", r->in.servername);
+ ndr->depth++;
+ ndr_print_lsa_String(ndr, "servername", r->in.servername);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "user_sid", r->in.user_sid);
+ ndr->depth++;
+ if (r->in.user_sid) {
+ ndr_print_dom_sid(ndr, "user_sid", r->in.user_sid);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "strings", r->in.strings);
+ ndr->depth++;
+ if (r->in.strings) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "strings", (int)r->in.num_of_strings);
+ ndr->depth++;
+ for (cntr_strings_1=0;cntr_strings_1<r->in.num_of_strings;cntr_strings_1++) {
+ char *idx_1=NULL;
+ if (asprintf(&idx_1, "[%d]", cntr_strings_1) != -1) {
+ ndr_print_ptr(ndr, "strings", r->in.strings[cntr_strings_1]);
+ ndr->depth++;
+ if (r->in.strings[cntr_strings_1]) {
+ ndr_print_lsa_String(ndr, "strings", r->in.strings[cntr_strings_1]);
+ }
+ ndr->depth--;
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "data", r->in.data);
+ ndr->depth++;
+ if (r->in.data) {
+ ndr_print_array_uint8(ndr, "data", r->in.data, r->in.data_size);
+ }
+ ndr->depth--;
+ ndr_print_uint16(ndr, "flags", r->in.flags);
+ ndr_print_ptr(ndr, "record_number", r->in.record_number);
+ ndr->depth++;
+ if (r->in.record_number) {
+ ndr_print_uint32(ndr, "record_number", *r->in.record_number);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "time_written", r->in.time_written);
+ ndr->depth++;
+ if (r->in.time_written) {
+ ndr_print_time_t(ndr, "time_written", *r->in.time_written);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "eventlog_ReportEventAndSourceW");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "record_number", r->out.record_number);
+ ndr->depth++;
+ if (r->out.record_number) {
+ ndr_print_uint32(ndr, "record_number", *r->out.record_number);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "time_written", r->out.time_written);
+ ndr->depth++;
+ if (r->out.time_written) {
+ ndr_print_time_t(ndr, "time_written", *r->out.time_written);
+ }
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
static const struct ndr_interface_call eventlog_calls[] = {
{
"eventlog_ClearEventLogW",
@@ -1794,6 +2692,14 @@ static const struct ndr_interface_call eventlog_calls[] = {
(ndr_print_function_t) ndr_print_eventlog_FlushEventLog,
false,
},
+ {
+ "eventlog_ReportEventAndSourceW",
+ sizeof(struct eventlog_ReportEventAndSourceW),
+ (ndr_push_flags_fn_t) ndr_push_eventlog_ReportEventAndSourceW,
+ (ndr_pull_flags_fn_t) ndr_pull_eventlog_ReportEventAndSourceW,
+ (ndr_print_function_t) ndr_print_eventlog_ReportEventAndSourceW,
+ false,
+ },
{ NULL, 0, NULL, NULL, NULL, false }
};
@@ -1823,7 +2729,7 @@ const struct ndr_interface_table ndr_table_eventlog = {
NDR_EVENTLOG_VERSION
},
.helpstring = NDR_EVENTLOG_HELPSTRING,
- .num_calls = 24,
+ .num_calls = 25,
.calls = eventlog_calls,
.endpoints = &eventlog_endpoints,
.authservices = &eventlog_authservices
diff --git a/librpc/gen_ndr/ndr_eventlog.h b/librpc/gen_ndr/ndr_eventlog.h
index f63fa9e569..3fa20e3a29 100644
--- a/librpc/gen_ndr/ndr_eventlog.h
+++ b/librpc/gen_ndr/ndr_eventlog.h
@@ -59,7 +59,9 @@ extern const struct ndr_interface_table ndr_table_eventlog;
#define NDR_EVENTLOG_FLUSHEVENTLOG (0x17)
-#define NDR_EVENTLOG_CALL_COUNT (24)
+#define NDR_EVENTLOG_REPORTEVENTANDSOURCEW (0x18)
+
+#define NDR_EVENTLOG_CALL_COUNT (25)
void ndr_print_eventlogReadFlags(struct ndr_print *ndr, const char *name, uint32_t r);
enum ndr_err_code ndr_push_eventlogEventTypes(struct ndr_push *ndr, int ndr_flags, enum eventlogEventTypes r);
enum ndr_err_code ndr_pull_eventlogEventTypes(struct ndr_pull *ndr, int ndr_flags, enum eventlogEventTypes *r);
@@ -92,4 +94,5 @@ void ndr_print_eventlog_DeregisterClusterSvc(struct ndr_print *ndr, const char *
void ndr_print_eventlog_WriteClusterEvents(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_WriteClusterEvents *r);
void ndr_print_eventlog_GetLogIntormation(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_GetLogIntormation *r);
void ndr_print_eventlog_FlushEventLog(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_FlushEventLog *r);
+void ndr_print_eventlog_ReportEventAndSourceW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReportEventAndSourceW *r);
#endif /* _HEADER_NDR_eventlog */
diff --git a/librpc/gen_ndr/srv_eventlog.c b/librpc/gen_ndr/srv_eventlog.c
index 73c536d50f..795afc9a5a 100644
--- a/librpc/gen_ndr/srv_eventlog.c
+++ b/librpc/gen_ndr/srv_eventlog.c
@@ -265,6 +265,8 @@ static bool api_eventlog_DeregisterEventSource(pipes_struct *p)
NDR_PRINT_IN_DEBUG(eventlog_DeregisterEventSource, r);
}
+ ZERO_STRUCT(r->out);
+ r->out.handle = r->in.handle;
r->out.result = _eventlog_DeregisterEventSource(p, r);
if (p->rng_fault_state) {
@@ -651,6 +653,13 @@ static bool api_eventlog_RegisterEventSourceW(pipes_struct *p)
NDR_PRINT_IN_DEBUG(eventlog_RegisterEventSourceW, r);
}
+ ZERO_STRUCT(r->out);
+ r->out.log_handle = talloc_zero(r, struct policy_handle);
+ if (r->out.log_handle == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
r->out.result = _eventlog_RegisterEventSourceW(p, r);
if (p->rng_fault_state) {
@@ -724,6 +733,13 @@ static bool api_eventlog_OpenBackupEventLogW(pipes_struct *p)
NDR_PRINT_IN_DEBUG(eventlog_OpenBackupEventLogW, r);
}
+ ZERO_STRUCT(r->out);
+ r->out.handle = talloc_zero(r, struct policy_handle);
+ if (r->out.handle == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
r->out.result = _eventlog_OpenBackupEventLogW(p, r);
if (p->rng_fault_state) {
@@ -889,6 +905,9 @@ static bool api_eventlog_ReportEventW(pipes_struct *p)
NDR_PRINT_IN_DEBUG(eventlog_ReportEventW, r);
}
+ ZERO_STRUCT(r->out);
+ r->out.record_number = r->in.record_number;
+ r->out.time_written = r->in.time_written;
r->out.result = _eventlog_ReportEventW(p, r);
if (p->rng_fault_state) {
@@ -1692,6 +1711,19 @@ static bool api_eventlog_GetLogIntormation(pipes_struct *p)
NDR_PRINT_IN_DEBUG(eventlog_GetLogIntormation, r);
}
+ ZERO_STRUCT(r->out);
+ r->out.buffer = talloc_zero_array(r, uint8_t, r->in.buf_size);
+ if (r->out.buffer == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ r->out.bytes_needed = talloc_zero(r, uint32_t);
+ if (r->out.bytes_needed == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
r->out.result = _eventlog_GetLogIntormation(p, r);
if (p->rng_fault_state) {
@@ -1800,6 +1832,82 @@ static bool api_eventlog_FlushEventLog(pipes_struct *p)
return true;
}
+static bool api_eventlog_ReportEventAndSourceW(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct eventlog_ReportEventAndSourceW *r;
+
+ call = &ndr_table_eventlog.calls[NDR_EVENTLOG_REPORTEVENTANDSOURCEW];
+
+ r = talloc(talloc_tos(), struct eventlog_ReportEventAndSourceW);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r, NULL);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(eventlog_ReportEventAndSourceW, r);
+ }
+
+ ZERO_STRUCT(r->out);
+ r->out.record_number = r->in.record_number;
+ r->out.time_written = r->in.time_written;
+ r->out.result = _eventlog_ReportEventAndSourceW(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(eventlog_ReportEventAndSourceW, r);
+ }
+
+ push = ndr_push_init_ctx(r, NULL);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
/* Tables */
static struct api_struct api_eventlog_cmds[] =
@@ -1828,6 +1936,7 @@ static struct api_struct api_eventlog_cmds[] =
{"EVENTLOG_WRITECLUSTEREVENTS", NDR_EVENTLOG_WRITECLUSTEREVENTS, api_eventlog_WriteClusterEvents},
{"EVENTLOG_GETLOGINTORMATION", NDR_EVENTLOG_GETLOGINTORMATION, api_eventlog_GetLogIntormation},
{"EVENTLOG_FLUSHEVENTLOG", NDR_EVENTLOG_FLUSHEVENTLOG, api_eventlog_FlushEventLog},
+ {"EVENTLOG_REPORTEVENTANDSOURCEW", NDR_EVENTLOG_REPORTEVENTANDSOURCEW, api_eventlog_ReportEventAndSourceW},
};
void eventlog_get_pipe_fns(struct api_struct **fns, int *n_fns)
@@ -1866,6 +1975,8 @@ NTSTATUS rpc_eventlog_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
case NDR_EVENTLOG_DEREGISTEREVENTSOURCE: {
struct eventlog_DeregisterEventSource *r = (struct eventlog_DeregisterEventSource *)_r;
+ ZERO_STRUCT(r->out);
+ r->out.handle = r->in.handle;
r->out.result = _eventlog_DeregisterEventSource(cli->pipes_struct, r);
return NT_STATUS_OK;
}
@@ -1914,12 +2025,24 @@ NTSTATUS rpc_eventlog_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
case NDR_EVENTLOG_REGISTEREVENTSOURCEW: {
struct eventlog_RegisterEventSourceW *r = (struct eventlog_RegisterEventSourceW *)_r;
+ ZERO_STRUCT(r->out);
+ r->out.log_handle = talloc_zero(mem_ctx, struct policy_handle);
+ if (r->out.log_handle == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
r->out.result = _eventlog_RegisterEventSourceW(cli->pipes_struct, r);
return NT_STATUS_OK;
}
case NDR_EVENTLOG_OPENBACKUPEVENTLOGW: {
struct eventlog_OpenBackupEventLogW *r = (struct eventlog_OpenBackupEventLogW *)_r;
+ ZERO_STRUCT(r->out);
+ r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
+ if (r->out.handle == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
r->out.result = _eventlog_OpenBackupEventLogW(cli->pipes_struct, r);
return NT_STATUS_OK;
}
@@ -1948,6 +2071,9 @@ NTSTATUS rpc_eventlog_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
case NDR_EVENTLOG_REPORTEVENTW: {
struct eventlog_ReportEventW *r = (struct eventlog_ReportEventW *)_r;
+ ZERO_STRUCT(r->out);
+ r->out.record_number = r->in.record_number;
+ r->out.time_written = r->in.time_written;
r->out.result = _eventlog_ReportEventW(cli->pipes_struct, r);
return NT_STATUS_OK;
}
@@ -2014,6 +2140,17 @@ NTSTATUS rpc_eventlog_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
case NDR_EVENTLOG_GETLOGINTORMATION: {
struct eventlog_GetLogIntormation *r = (struct eventlog_GetLogIntormation *)_r;
+ ZERO_STRUCT(r->out);
+ r->out.buffer = talloc_zero_array(mem_ctx, uint8_t, r->in.buf_size);
+ if (r->out.buffer == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.bytes_needed = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.bytes_needed == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
r->out.result = _eventlog_GetLogIntormation(cli->pipes_struct, r);
return NT_STATUS_OK;
}
@@ -2024,6 +2161,15 @@ NTSTATUS rpc_eventlog_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
return NT_STATUS_OK;
}
+ case NDR_EVENTLOG_REPORTEVENTANDSOURCEW: {
+ struct eventlog_ReportEventAndSourceW *r = (struct eventlog_ReportEventAndSourceW *)_r;
+ ZERO_STRUCT(r->out);
+ r->out.record_number = r->in.record_number;
+ r->out.time_written = r->in.time_written;
+ r->out.result = _eventlog_ReportEventAndSourceW(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
default:
return NT_STATUS_NOT_IMPLEMENTED;
}
diff --git a/librpc/gen_ndr/srv_eventlog.h b/librpc/gen_ndr/srv_eventlog.h
index c540f92242..11d6886a24 100644
--- a/librpc/gen_ndr/srv_eventlog.h
+++ b/librpc/gen_ndr/srv_eventlog.h
@@ -25,6 +25,7 @@ NTSTATUS _eventlog_DeregisterClusterSvc(pipes_struct *p, struct eventlog_Deregis
NTSTATUS _eventlog_WriteClusterEvents(pipes_struct *p, struct eventlog_WriteClusterEvents *r);
NTSTATUS _eventlog_GetLogIntormation(pipes_struct *p, struct eventlog_GetLogIntormation *r);
NTSTATUS _eventlog_FlushEventLog(pipes_struct *p, struct eventlog_FlushEventLog *r);
+NTSTATUS _eventlog_ReportEventAndSourceW(pipes_struct *p, struct eventlog_ReportEventAndSourceW *r);
void eventlog_get_pipe_fns(struct api_struct **fns, int *n_fns);
NTSTATUS rpc_eventlog_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *r);
NTSTATUS _eventlog_ClearEventLogW(pipes_struct *p, struct eventlog_ClearEventLogW *r);
@@ -51,5 +52,6 @@ NTSTATUS _eventlog_DeregisterClusterSvc(pipes_struct *p, struct eventlog_Deregis
NTSTATUS _eventlog_WriteClusterEvents(pipes_struct *p, struct eventlog_WriteClusterEvents *r);
NTSTATUS _eventlog_GetLogIntormation(pipes_struct *p, struct eventlog_GetLogIntormation *r);
NTSTATUS _eventlog_FlushEventLog(pipes_struct *p, struct eventlog_FlushEventLog *r);
+NTSTATUS _eventlog_ReportEventAndSourceW(pipes_struct *p, struct eventlog_ReportEventAndSourceW *r);
NTSTATUS rpc_eventlog_init(void);
#endif /* __SRV_EVENTLOG__ */