[stunnel-users] [PATCH]: Debugging output

Andrew Watts akwatts at ymail.com
Tue Nov 8 13:26:29 CET 2011


According to the manpage for the output=<file> configuration directive, if
this is set then it should replace syslog facility logging.

However, stunnel 4.45 (and ealier version) on linux send debugging
information to both syslog and a logfile when output is specified.

The following patch makes stunnel behave according to the manpage "append
log messages to a file instead of using syslog":

--- a/src/log.c          
+++ b/src/log.c            
@@ -163,7 +163,7 @@ static void log_raw(const int level, con
         line=str_printf("%s %s: %s", stamp, id, text);
         if(level<=global_options.debug_level) {
 #if !defined(USE_WIN32) && !defined(__vms)
-            if(global_options.option.syslog)
+            if(global_options.option.syslog && !global_options.output_file)
                 syslog(level, "%s: %s", id, text);
 #endif /* USE_WIN32, __vms */

~ Andy

More information about the stunnel-users mailing list