[syslog-ng] syslog-ng 1.6.x on OpenBSD on sparc64
Bostjan Golob
bostjan.golob at gmail.com
Tue May 24 23:05:24 CEST 2005
It appears that syslog-ng has an issue on OpenBSD/sparc64, as it does
not determine the hostname of the remote system, making all messages
appear to be from the syslog-ng server. The bug appears to be well
hidden in sources.c. In line 98, the call to do_recv (as seen in gdb
backtrace) is made, which requires a socklen_t* parameter. The catch
is in line 88, where salen is declared as size_t and then cast to
socklen_t; on sparc64, size_t is 64bit and socklen_t is 32bit and that
causes the salen variable to always contain 0, causing the known bug.
If you change line 88 to socklen_t salen = sizeof(sabuf), the host
name of the sending host is determined correctly and written in the
logfiles.
That also explains why syslog-ng works correctly on OpenBSD/i386, but
not on sparc64.
Bostjan Golob
IT department,
Gimnazija Bezigrad,
Ljubljana, SI
More information about the syslog-ng
mailing list