[syslog-ng] 1.4.0rc3 - year 1970

Balazs Scheidler bazsi@balabit.hu
Tue, 29 Feb 2000 16:40:35 +0100


On Tue, Feb 29, 2000 at 03:05:23PM +0100, John Källström wrote:
> 
> Hello!
> 
> A quick glance at my logfiles shows that on startup syslog-ng will produce
> 2 messages. One of them ends up in /var/syslog/husmusen/1970/01/debug
> 
> *snip*
> Feb 29 14:57:13 husmusen syslog-ng[22926]: syslog-ng version 1.4.0rc3
> starting
> *snip*

ops, internal messages had bogus date, try this patch:

diff -urN syslog-ng-1.4.0rc3/src/log.c syslog-ng-1.4.0rc4/src/log.c
--- syslog-ng-1.4.0rc3/src/log.c        Fri Feb 25 13:20:43 2000
+++ syslog-ng-1.4.0rc4/src/log.c        Tue Feb 29 16:36:13 2000
@@ -142,7 +142,7 @@
                }
                else {
                        while (left && *src != ' ' && *src != '[' && *src != ':' && 
-                              src != '/' && src != ',' && src != '<') {
+                              *src != '/' && *src != ',' && *src != '<') {
                                src++;
                                left--;
                        }
@@ -193,7 +193,7 @@
        NEW_SPACE(self);
        self->msg = c_format_cstring("syslog-ng[%i]: %s", getpid(), length, data);
        self->program = c_format_cstring("syslog-ng");
-       self->recvd = time(NULL);
+       self->stamp = self->recvd = time(NULL);
        self->pri = pri;
        self->flags = LF_INTERNAL;
        self->use_cnt = 1;

> and the other one ends up in /var/syslog/husmusen/2000/02/debug (which to
> me seems more correct since it's not year 1970 and not even month 01 :-)
>       
> *snip*                               
> Feb 29 14:57:13 husmusen syslog-ng: syslog-ng startup succeeded
> *snip*

this line is not generated by syslog-ng, maybe a special startup script?

-- 
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
     url: http://www.balabit.hu/pgpkey.txt