[syslog-ng]Syslog-ng 1.6.4 adds ^@ to each line

syslog-ng@lists.balabit.hu syslog-ng@lists.balabit.hu
Fri, 4 Jun 2004 14:45:15 +0200


Sorry I can't compile this. Get the following error.

Making all in src
make[1]: Entering directory `/usr/src/syslog-ng-1.6.4/src'
make  all-recursive
make[2]: Entering directory `/usr/src/syslog-ng-1.6.4/src'
Making all in .
make[3]: Entering directory `/usr/src/syslog-ng-1.6.4/src'
gcc -DHAVE_CONFIG_H -I. -I/usr/src/syslog-ng-1.6.4/src -I.     -g -O2 =
-Wall
-I/usr/local/include/libol -D_GNU_SOURCE -c main.c
make_class <sources.c >sources.c.xT
/bin/sh: /usr/local/bin/make_class: \: bad interpreter: No such file or
directory
make[3]: *** [sources.c.x] Error 126
make[3]: Leaving directory `/usr/src/syslog-ng-1.6.4/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/syslog-ng-1.6.4/src'
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory `/usr/src/syslog-ng-1.6.4/src'
make: *** [all-recursive] Error 1

Balazs Scheidler wrote:
> 2004-06-04, p keltez=E9ssel 13:34-kor =
Benjamin.Zoeller@salt-solutions.de
> ezt =EDrta:
>> Hi again,
>> here is an tcpdump with parameter -s 255 thx to jozsef
>>=20
>> 13:24:30.357952 000.000.000.000.syslog-ng >
>> 000.000.000.000.syslog-ng: udp 83 0x0000   4500 006f d16e 0000 3e11
>> 938c 0000 0000        E..o.n..>....... 0x0010   0000 0000 0202 0202
>> 005b 902c 3c31 3430        .........[.,<140 0x0020   3e41 4343 543a
>> 204c 4f47 494e 2046 4149        >ACCT:.LOGIN.FAI 0x0030   4c45 4420
>> 6173 2079 6164 2066 726f 6d20        LED.as.yad.from. 0x0040   5445
>> 4c4e 4554 2031 302e 3139 392e 322e        TELNET.10.199.2. 0x0050 =20
>> 3635 2061 7420 4672 6920 4a75 6e20 2034        65.at.Fri.Jun..4
>> 0x0060   2031 323a 3234 3a32 3820 3230 3034 00        =20
>> .12:24:28.2004. =20
>>=20
>> @John
>> thx for your hint, but I think it`s to late now.
>> I simply forgot to hide this in the hex part.
>>=20
>> @all
>> Hope somebody can tell me why I get ^@ at each line.
>>=20
>=20
> Can you check if this patch works? (it fixed the problem for me)
>=20
> diff -u -r1.37.4.2 sources.c
> --- src/sources.c       10 Mar 2004 18:43:28 -0000      1.37.4.2
> +++ src/sources.c       4 Jun 2004 12:28:26 -0000
> @@ -120,6 +120,13 @@
>                    full or we are a datagram receiver, when the
>                    message is in its own packet.
>                  */
> +               if (closure->dgram) {
> +                       /* strip one trailing LF or NUL character */
> +                       if (closure->pos > 0 &&
> +                           (closure->buffer[closure->pos - 1] =3D=3D
> '\n' || +                            closure->buffer[closure->pos -
> 1] =3D=3D '\0')) +                               closure->pos--;
> +               }
>                 do_handle_line(closure, closure->pos,
>                 closure->buffer, salen ? (abstract_addr *) &sabuf :
>                 NULL, salen); closure->pos =3D 0; return ST_OK |
> ST_GOON;=20