1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

r23591: Fix bug #4725. Don't crash when no eventlogs specified. Needs

merging for 3.0.25b.
Jeremy.
(This used to be commit ae239fec6f)
This commit is contained in:
Jeremy Allison 2007-06-22 19:33:46 +00:00 committed by Gerald (Jerry) Carter
parent ed961d66b2
commit d1d2157153
2 changed files with 8 additions and 0 deletions

View File

@ -194,6 +194,10 @@ BOOL eventlog_add_source( const char *eventlog, const char *sourcename,
int i;
int numsources;
if (!elogs) {
return False;
}
for ( i = 0; elogs[i]; i++ ) {
if ( strequal( elogs[i], eventlog ) )
break;

View File

@ -123,6 +123,10 @@ static BOOL elog_validate_logname( const char *name )
int i;
const char **elogs = lp_eventlog_list();
if (!elogs) {
return False;
}
for ( i=0; elogs[i]; i++ ) {
if ( strequal( name, elogs[i] ) )
return True;