[syslog-ng]Bug in unix_stream/dgram() dest drivers 1.6.0rc4

Balazs Scheidler syslog-ng@lists.balabit.hu
Mon, 16 Feb 2004 22:28:08 +0100


2004-02-16, h keltezéssel 19:09-kor Andreas Schulze ezt írta:
> Hi Bazi,
> 
> it seems I've found a bug in the unix_stream/unix_dgram
> destination drivers.
> 
> The problem is, that running sysng with something like
> 
> 	destination d_stream { unix-stream("/tmp/stream_sock"); };
> 	or
> 	destination d_dgram  { unix-dgram("/tmp/dgram_sock"); };
> 
> it doesn't create the socket in the file system, so the
> connect() fails. Seems that bind_unix_socket() is never called.
> 
> The appended trace shows, that there isn't a bind() between
> so_socket() = 4 and connect(4)
> 
> As far as I know, bind() must be called before connect() to create
> the socket in the local filesys. It should be removed via unlink()
> after all work is done.
> 
> Feedback or a hot-fix is very wellcome.

bind is called by the program creating the UNIX dgram socket. in this
case you instructed syslog-ng to connect to such a socket, where binding
is not necessary.

What do you want to use those sockets for? Maybe you wanted to create
message sources?

-- 
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1