[Snort-users] v1.7 syslog.c Win32 conversion error - Incorrect date parameters

Rich Adamson radamson at ...2127...
Mon May 28 13:52:37 EDT 2001

Problem: The Win32 version of Snort does not properly insert the date
into the syslog message. 

Resolution: The "%h %e %T" format string used in Unix systems is not supported
in Win32 systems. The format string "%b %d %X" produces the correct results.

The following code should be changed within the syslog.c module for
supporting the Win32 version of snort. (The change is based on v1.7
source code.)

	/* Win32 uses different formating characters then Unix */
#ifdef WIN32
        prlen = strftime(p, tbuf_left, "%b %d %X ", localtime(&now));
        prlen = strftime(p, tbuf_left, "%h %e %T ", localtime(&now));


More information about the Snort-users mailing list