Share eventlog.idl.
authorJelmer Vernooij <jelmer@samba.org>
Wed, 15 Oct 2008 14:37:27 +0000 (16:37 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 15 Oct 2008 14:37:27 +0000 (16:37 +0200)
librpc/idl/eventlog.idl [moved from source3/librpc/idl/eventlog.idl with 100% similarity]
source3/Makefile.in
source4/librpc/idl/eventlog.idl [deleted file]
source4/torture/rpc/eventlog.c

index 87c70c56be726821529bc15bb333768583ccfeef..c5940b483b023b7dfd97eb4b92f947f3ccdee98c 100644 (file)
@@ -1202,7 +1202,7 @@ samba3-idl::
         srcdir="$(srcdir)" $(srcdir)/script/build_idl.sh librpc/idl/lsa.idl \
                ../librpc/idl/dfs.idl ../librpc/idl/echo.idl librpc/idl/winreg.idl \
                ../librpc/idl/initshutdown.idl librpc/idl/srvsvc.idl ../librpc/idl/svcctl.idl \
-               librpc/idl/eventlog.idl librpc/idl/wkssvc.idl librpc/idl/netlogon.idl \
+               ../librpc/idl/eventlog.idl librpc/idl/wkssvc.idl librpc/idl/netlogon.idl \
                ../librpc/idl/notify.idl ../librpc/idl/epmapper.idl librpc/idl/messaging.idl \
                ../librpc/idl/xattr.idl ../librpc/idl/misc.idl librpc/idl/samr.idl \
                ../librpc/idl/security.idl ../librpc/idl/dssetup.idl librpc/idl/krb5pac.idl \
diff --git a/source4/librpc/idl/eventlog.idl b/source4/librpc/idl/eventlog.idl
deleted file mode 100644 (file)
index 4a62ce1..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-#include "idl_types.h"
-
-/*
-  eventlog interface definition
-*/
-
-import "lsa.idl", "security.idl";
-
-[ uuid("82273fdc-e32a-18c3-3f78-827929dc23ea"),
-  version(0.0),
-  pointer_default(unique),
-  helpstring("Event Logger")
-] interface eventlog
-{
-       typedef bitmap {
-               EVENTLOG_SEQUENTIAL_READ = 0x0001,
-               EVENTLOG_SEEK_READ       = 0x0002,
-               EVENTLOG_FORWARDS_READ   = 0x0004,
-               EVENTLOG_BACKWARDS_READ  = 0x0008
-       } eventlogReadFlags;
-
-       typedef bitmap {
-               EVENTLOG_SUCCESS          = 0x0000,
-               EVENTLOG_ERROR_TYPE       = 0x0001,
-               EVENTLOG_WARNING_TYPE     = 0x0002,
-               EVENTLOG_INFORMATION_TYPE = 0x0004,
-               EVENTLOG_AUDIT_SUCCESS    = 0x0008,
-               EVENTLOG_AUDIT_FAILURE    = 0x0010
-       } eventlogEventTypes;
-
-       typedef struct {
-               uint16 unknown0;
-               uint16 unknown1;
-       } eventlog_OpenUnknown0;
-       
-       typedef [public] struct { 
-               uint32 size;
-               uint32 reserved;
-               uint32 record_number;
-               uint32 time_generated;
-               uint32 time_written;
-               uint32 event_id;
-               uint16 event_type;
-               uint16 num_of_strings;
-               uint16 event_category;
-               uint16 reserved_flags;
-               uint32 closing_record_number;
-               uint32 stringoffset;
-               uint32 sid_length;
-               uint32 sid_offset;
-               uint32 data_length;
-               uint32 data_offset;
-               nstring source_name;
-               nstring computer_name;
-               nstring strings[num_of_strings];
-               astring raw_data;
-       } eventlog_Record;
-
-       /******************/
-       /* Function: 0x00 */
-       NTSTATUS eventlog_ClearEventLogW(
-               [in] policy_handle *handle,
-               [in,unique] lsa_String *unknown
-       );
-
-       /******************/
-       /* Function: 0x01 */
-       [todo] NTSTATUS eventlog_BackupEventLogW();
-       
-       /******************/
-       /* Function: 0x02 */
-       NTSTATUS eventlog_CloseEventLog(
-               [in,out] policy_handle *handle
-       );
-
-       /******************/
-       /* Function: 0x03 */
-       [todo] NTSTATUS eventlog_DeregisterEventSource();
-
-       /******************/
-       /* Function: 0x04 */
-       NTSTATUS eventlog_GetNumRecords(
-               [in] policy_handle *handle,
-               [out] uint32 *number
-       );
-
-       /******************/
-       /* Function: 0x05 */
-       NTSTATUS eventlog_GetOldestRecord(
-               [in] policy_handle *handle,
-               [out,ref] uint32 *oldest_entry
-       );
-
-       /******************/
-       /* Function: 0x06 */
-       [todo] NTSTATUS eventlog_ChangeNotify();
-
-       /******************/
-       /* Function: 0x07 */
-       NTSTATUS eventlog_OpenEventLogW(
-               [in,unique]         eventlog_OpenUnknown0 *unknown0,
-               [in]        lsa_String logname,
-               [in]        lsa_String servername,
-               [in]        uint32 unknown2,
-               [in]        uint32 unknown3,
-               [out]   policy_handle *handle
-       );
-
-       /******************/
-       /* Function: 0x08 */
-       [todo] NTSTATUS eventlog_RegisterEventSourceW();
-
-       /******************/
-       /* Function: 0x09 */
-       [todo] NTSTATUS eventlog_OpenBackupEventLogW();
-
-       /******************/
-       /* Function: 0x0a */
-       NTSTATUS eventlog_ReadEventLogW(
-               [in] policy_handle *handle,
-               [in] uint32 flags,
-               [in] uint32 offset,
-               [in] uint32 number_of_bytes,
-               [out,size_is(number_of_bytes)] uint8 *data,
-               [out] uint32 *sent_size,
-               [out] uint32 *real_size
-       );
-
-       /*****************/
-       /* Function 0x0b */
-       [todo] NTSTATUS eventlog_ReportEventW();
-
-       /*****************/
-       /* Function 0x0c */
-       [todo] NTSTATUS eventlog_ClearEventLogA();
-       
-       /******************/
-       /* Function: 0x0d */
-       [todo] NTSTATUS eventlog_BackupEventLogA();
-
-       /*****************/
-       /* Function 0x0e */
-       [todo] NTSTATUS eventlog_OpenEventLogA();
-
-       /*****************/
-       /* Function 0x0f */
-       [todo] NTSTATUS eventlog_RegisterEventSourceA();
-
-       /*****************/
-       /* Function 0x10 */
-       [todo] NTSTATUS eventlog_OpenBackupEventLogA();
-
-       /*****************/
-       /* Function 0x11 */
-       [todo] NTSTATUS eventlog_ReadEventLogA();
-
-       /*****************/
-       /* Function 0x12 */
-       [todo] NTSTATUS eventlog_ReportEventA();
-
-       /*****************/
-       /* Function 0x13 */
-       [todo] NTSTATUS eventlog_RegisterClusterSvc();
-
-       /*****************/
-       /* Function 0x14 */
-       [todo] NTSTATUS eventlog_DeregisterClusterSvc();
-
-       /*****************/
-       /* Function 0x15 */
-       [todo] NTSTATUS eventlog_WriteClusterEvents();
-
-       /*****************/
-       /* Function 0x16 */
-       [todo] NTSTATUS eventlog_GetLogIntormation();
-
-       /*****************/
-       /* Function 0x17 */
-       NTSTATUS eventlog_FlushEventLog(
-               [in] policy_handle *handle
-       );      
-}
index feeeb9330b501e10e1b6bab8e83a0956b966d198..d5665ad07da443e5e2df9b33a12176dd94dd08de 100644 (file)
@@ -40,13 +40,16 @@ static bool get_policy_handle(struct torture_context *tctx,
 {
        struct eventlog_OpenEventLogW r;
        struct eventlog_OpenUnknown0 unknown0;
+       struct lsa_String logname, servername;
 
        unknown0.unknown0 = 0x005c;
        unknown0.unknown1 = 0x0001;
 
        r.in.unknown0 = &unknown0;
-       init_lsa_String(&r.in.logname, "dns server");
-       init_lsa_String(&r.in.servername, NULL);
+       init_lsa_String(r.in.logname, "dns server");
+       init_lsa_String(r.in.servername, NULL);
+       r.in.logname = &logname;
+       r.in.servername = &servername;
        r.in.unknown2 = 0x00000001;
        r.in.unknown3 = 0x00000001;
        r.out.handle = handle;
@@ -205,7 +208,7 @@ static bool test_ClearEventLog(struct torture_context *tctx,
                return false;
 
        r.in.handle = &handle;
-       r.in.unknown = NULL;
+       r.in.backupfile = NULL;
 
        torture_assert_ntstatus_ok(tctx, 
                        dcerpc_eventlog_ClearEventLogW(p, tctx, &r),