summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h4
-rw-r--r--source3/rpc_server/srv_eventlog_lib.c28
2 files changed, 32 insertions, 0 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 0f9779f2f8..68c4c8b8e3 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -6271,6 +6271,10 @@ NTSTATUS evlog_push_record_tdb(TALLOC_CTX *mem_ctx,
TDB_CONTEXT *tdb,
struct eventlog_Record_tdb *r,
uint32_t *record_number);
+NTSTATUS evlog_push_record(TALLOC_CTX *mem_ctx,
+ TDB_CONTEXT *tdb,
+ struct EVENTLOGRECORD *r,
+ uint32_t *record_number);
struct EVENTLOGRECORD *evlog_pull_record(TALLOC_CTX *mem_ctx,
TDB_CONTEXT *tdb,
uint32_t record_number);
diff --git a/source3/rpc_server/srv_eventlog_lib.c b/source3/rpc_server/srv_eventlog_lib.c
index 1cd306c5f2..2c70141360 100644
--- a/source3/rpc_server/srv_eventlog_lib.c
+++ b/source3/rpc_server/srv_eventlog_lib.c
@@ -941,6 +941,34 @@ NTSTATUS evlog_push_record_tdb(TALLOC_CTX *mem_ctx,
/********************************************************************
********************************************************************/
+NTSTATUS evlog_push_record(TALLOC_CTX *mem_ctx,
+ TDB_CONTEXT *tdb,
+ struct EVENTLOGRECORD *r,
+ uint32_t *record_number)
+{
+ struct eventlog_Record_tdb *t;
+ NTSTATUS status;
+
+ t = talloc_zero(mem_ctx, struct eventlog_Record_tdb);
+ if (!t) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ status = evlog_evt_entry_to_tdb_entry(t, r, t);
+ if (!NT_STATUS_IS_OK(status)) {
+ talloc_free(t);
+ return status;
+ }
+
+ status = evlog_push_record_tdb(mem_ctx, tdb, t, record_number);
+ talloc_free(t);
+
+ return status;
+}
+
+/********************************************************************
+ ********************************************************************/
+
NTSTATUS evlog_evt_entry_to_tdb_entry(TALLOC_CTX *mem_ctx,
const struct EVENTLOGRECORD *e,
struct eventlog_Record_tdb *t)