Hi, syslog-ng 1.5.14 was released with the following NEWS entry: News for the 1.5.14 release Tue, 5 Feb 2002 11:35:52 +0100 New features: * tcp wrapper support * added several new macros in filename expansion * support for simple log rotation (remove_if_older) It can be downloaded from http://www.balabit.hu/en/downloads/syslog-ng -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
Hi, Balazs! Thanks for applying my patches! I see that you have beautified my code a little. Maybe you made a mistake, though. In affile.c: ---8<--- cut here ----- case M_SOURCE_IP: if (msg->saddr) { CAST(inet_address_info, addr, msg->saddr); char *ip; ip = inet_ntoa(addr->sa.sin_addr); length = append_string(dest, left, ip, strlen(ip), escape); break; } case M_HOST: { ---8<--- cut here ----- Since the break is inside the if block, the hostname will be inserted when there is no source ip. While this is better than nothing, wouldn't it be even better to insert a string like "127.0.0.1" ? Can I safely assume that a missing source ip means that the mesage comes from localhost? Greetings Gert
On Tue, Feb 05, 2002 at 04:12:32PM +0100, Gert Menke wrote:
Hi, Balazs!
Thanks for applying my patches! I see that you have beautified my code a little. Maybe you made a mistake, though. In affile.c:
---8<--- cut here ----- case M_SOURCE_IP: if (msg->saddr) { CAST(inet_address_info, addr, msg->saddr); char *ip;
ip = inet_ntoa(addr->sa.sin_addr); length = append_string(dest, left, ip, strlen(ip), escape); break; } case M_HOST: { ---8<--- cut here -----
Since the break is inside the if block, the hostname will be inserted when there is no source ip. While this is better than nothing, wouldn't it be even better to insert a string like "127.0.0.1" ? Can I safely assume that a missing source ip means that the mesage comes from localhost?
you are right, I applied the patches in a hurry, and I made a mistake. I originally meant to insert nothing if it comes from the localhost, though inserting "127.0.0.1" might be even better. -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
Hello Balazs, On Tue, Feb 05, 2002 at 04:12:32PM +0100, I wrote:
While this is better than nothing, wouldn't it be even better to insert a string like "127.0.0.1" ? Can I safely assume that a missing source ip means that the mesage comes from localhost?
If this is the case, please apply this patch. Thank you, Gert
Oh well... I forgot to attach the patch. Here it is. Gert
Balazs Scheidler writes:
syslog-ng 1.5.14 was released with the following NEWS entry: * tcp wrapper support
Oops, it won't build with --enable-tcp-wrapper. Two problems: 1. need to add "LDFLAGS=-lwrap" in the Makefile. 2. two lines from my original patch are missing from afinet.c: diff -u -r1.1 afinet.c --- afinet.c 2002/02/05 23:58:30 1.1 +++ afinet.c 2002/02/05 23:58:41 @@ -34,6 +34,8 @@ #if ENABLE_TCP_WRAPPER #include <tcpd.h> +int allow_severity= 0; +int deny_severity= 0; #endif #include "afinet.c.x"
participants (3)
-
Balazs Scheidler
-
Ed Ravin
-
Gert Menke