Sysklogd with Perl


Jon Leonard (jleonard@frost.slimy.com)
Mon, 6 Sep 1999 17:36:07 -0700


I've modified sysklogd-1.3-31 to allow calling Perl functions as an action.
The original motiviation was to integrate syslog events with a proprietary
event handler (wrapped in a Perl module), but the functionality may be
useful to other people as well.

I also have modifications to run the syslog.conf file through m4, and other
(less interesting) tweaks to make it more like the Solaris syslogd.

In the process I found a few portability issues as well:

The "size_t len;" on line 759 of syslogd.c should be "int len;", as the
accept and recvfrom calls that use it take an int*, not a size_t*. This
works only if sizeof(int)==sizeof(size_t) or sizeof(int)<sizeof(size_t) on
a little endian machine. That covers my machines (x86 and alpha), but...
There's a similar problem on line 602 of ksym_mod.c, but I'm not as certain
of the fix.

The call to utmpname on line 1901 of syslogd.c should probably use UTMP_FILE
instead of _PATH_UTMP, or there isn't much point in the #ifdefs that define
UTMP_FILE.

The various signal handlers should probably all take integer arguments instead
of no arguments, but that's probably being unduly picky.

I'm currently wondering if anyone is interested in this stuff, and if so what's
the best way to distribute it.

I currently have tarfiles under http://frost.slimy.com/~jleonard/syslog/ .

Jon Leonard
-
To unsubscribe: send mail to Majordomo@Infodrom.North.DE with the
text "unsubscribe sysklogd" in the message body.



This archive was generated by hypermail 2.0b3 on Tue Sep 07 1999 - 02:39:07 CEST