r12002: patch from marcin to allow for the creation of a File value in the eventlog...
authorGerald Carter <jerry@samba.org>
Thu, 1 Dec 2005 23:10:27 +0000 (23:10 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:05:41 +0000 (11:05 -0500)
(This used to be commit 270fef5175559ba6345bb2c3e264c527a6a084c5)

source3/registry/reg_eventlog.c

index d802b18aca200e8476c054a417e6c03277d7253d..1c65c9b21785b12eb22266581a6196df5dc3cb93 100644 (file)
@@ -33,6 +33,7 @@ BOOL eventlog_init_keys( void )
        /* Find all of the eventlogs, add keys for each of them */
        const char **elogs = lp_eventlog_list(  );
        pstring evtlogpath;
+       pstring evtfilepath;
        REGSUBKEY_CTR *subkeys;
        REGVAL_CTR *values;
        uint32 uiDisplayNameId;
@@ -98,10 +99,12 @@ BOOL eventlog_init_keys( void )
                        regval_ctr_addvalue( values, "MaxSize", REG_DWORD,
                                             ( char * ) &uiMaxSize,
                                             sizeof( uint32 ) );
+
                        regval_ctr_addvalue( values, "Retention", REG_DWORD,
                                             ( char * ) &uiRetention,
                                             sizeof( uint32 ) );
                        init_unistr2( &data, *elogs, UNI_STR_TERMINATE );
+
                        regval_ctr_addvalue( values, "PrimaryModule", REG_SZ,
                                             ( char * ) data.buffer,
                                             data.uni_str_len *
@@ -112,6 +115,11 @@ BOOL eventlog_init_keys( void )
                                             ( char * ) data.buffer,
                                             data.uni_str_len *
                                             sizeof( uint16 ) );
+
+                       pstr_sprintf( evtfilepath, "%%SystemRoot%%\\system32\\config\\%s.tdb", *elogs );
+                       init_unistr2( &data, evtfilepath, UNI_STR_TERMINATE );
+                       regval_ctr_addvalue( values, "File", REG_EXPAND_SZ, ( char * ) data.buffer,
+                                            data.uni_str_len * sizeof( uint16 ) );
                        regdb_store_values( evtlogpath, values );
 
                }