1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

r12002: patch from marcin to allow for the creation of a File value in the eventlog registry keys so that file properties can be displayed

(This used to be commit 270fef5175559ba6345bb2c3e264c527a6a084c5)
This commit is contained in:
Gerald Carter 2005-12-01 23:10:27 +00:00 committed by Gerald (Jerry) Carter
parent bd21ee68e5
commit 15615dc1f6

View 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 );
}