[Snort-devel] Patch to make barnyard log in localtime

Steve Halligan agent33 at ...269...
Fri Nov 16 13:26:03 EST 2001


I used -l which was used by something else before, but it seems logical to
use.  If you want to change it, feel free :)


diff -r ../cvsroot/barnyard/src/barnyard.c ./src/barnyard.c
135c135
<     while((ch = getopt(argc, argv, "a:c:d:f:g:hop:r:s:t:w:D:L:RV?")) !=
-1)
---
>     while((ch = getopt(argc, argv, "a:c:d:f:g:hlop:r:s:t:w:DL:RV?")) !=
-1)
193c193,197
<             case 'L': /* specify output log dir and file */
---
>             case 'l': /* set timestamps to localtime */
> 	        pv.localtime = 1;
> 	        break;
> 
> 	    case 'L': /* specify output log dir and file */
366a371
>     fputs("-l               Set timestamps to localtime\n", stderr);
diff -r ../cvsroot/barnyard/src/barnyard.h ./src/barnyard.h
57a58
>     u_int8_t localtime;
diff -r ../cvsroot/barnyard/src/util.c ./src/util.c
535,537c535,542
< 
<     lt = gmtime(&timet);
< 
---
>     if(pv.localtime)
>     {
>       lt = localtime(&timet);
>     }
>     else
>     {
>       lt = gmtime(&timet);
>     }




More information about the Snort-devel mailing list