[syslog-ng] segfaults with 1.9.x series syslog-ng and stream
socket
Balazs Scheidler
bazsi at balabit.hu
Wed Jun 28 14:06:46 CEST 2006
On Fri, 2006-06-23 at 18:42 -0400, func tionate wrote:
> I have written a sql stream socket daemon that for now is listening on
> /var/tmp/syslog-socket and passes inserts to child processes. Starting
> syslog-ng up with this socket as a destination on both the latest beta
> release and today's cvs of 1.9.x (2.0rc1) cause it to bomb out with a
> segfault. I have tested this both on an x86_64 linux gentoo amd64 box
> and a centos 4 i386 xeon box. I have used the same stream socket
> daemon with the latest 1.6 release and it has been reliable. I have
> configured syslog-ng and built it with stock ./configure. also, when i
> pull out the stream socket and associated config and start the daemon,
> everything works as expected.
>
> Below I've included the only deviations from the syslog-ng.conf
> RedHat config from the contrib directory (and the source definition
> for clarity), and an strace. Please let me know if there is any
> further info i can provide. (some cleansing of node names was done for
> obvious reasons)
The patch below should fix this issue:
--- orig/src/afunix.c
+++ mod/src/afunix.c
@@ -110,7 +110,7 @@ afunix_dd_new(gchar *filename, guint fla
AFUnixDestDriver *self = g_new0(AFUnixDestDriver, 1);
afsocket_dd_init_instance(&self->super, &self->sock_options, flags);
- self->super.bind_addr = NULL;
+ self->super.bind_addr = g_sockaddr_unix_new(NULL);
self->super.dest_addr = g_sockaddr_unix_new(filename);
return &self->super.super;
}
--
Bazsi
More information about the syslog-ng
mailing list