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:
parent
ed961d66b2
commit
d1d2157153
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user