summaryrefslogtreecommitdiffstats
path: root/source/lib
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-08-16 15:30:17 +0000
committerGerald Carter <jerry@samba.org>2004-08-16 15:30:17 +0000
commit3150d5c24fe15f6673d147d899e10983c66bddfc (patch)
tree9b90c1a4e2c6219608244dc53cda2cef8bd29c76 /source/lib
parenteaea9ddbd191a21661c8d4dd74708dac7fb65299 (diff)
downloadsamba-3150d5c24fe15f6673d147d899e10983c66bddfc.tar.gz
samba-3150d5c24fe15f6673d147d899e10983c66bddfc.tar.xz
samba-3150d5c24fe15f6673d147d899e10983c66bddfc.zip
r1834: prevent infinite recusion in reopen_logs() when expanding the smb.conf variable %I
Diffstat (limited to 'source/lib')
-rw-r--r--source/lib/debug.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/lib/debug.c b/source/lib/debug.c
index e5e203e076a..01aedb47740 100644
--- a/source/lib/debug.c
+++ b/source/lib/debug.c
@@ -572,6 +572,7 @@ BOOL reopen_logs( void )
oldumask = umask( 022 );
pstrcpy(fname, debugf );
+ debugf[0] = '\0';
if (lp_loaded()) {
char *logfname;
@@ -726,7 +727,12 @@ void check_log_size( void )
errno = old_errno;
return( 0 );
}
-
+
+ /* prevent recursion by checking if reopen_logs() has temporaily
+ set the debugf string to "" */
+ if( debugf[0] == '\0')
+ return( 0 );
+
#ifdef WITH_SYSLOG
if( !lp_syslog_only() )
#endif