Marco van Tol wrote:
Hi there,
I was fighting to get ipmon to log to syslog facility 'security' for a while
when I decided to check out what the source code was doing.
What I was trying to do, SIGHUP'ing syslog and restarting ipmon for a while,
was "ipmon -DsL security", to get it to daemonize, log-to-syslog and log to
facility security.
Looking at the source code for ipmon (ipmon.c) I found that the handling for
-s in the getopt loop immediately does an openlog. So, if you supply the -L
argument after the -s argument, it will first call openlog with the default
facility, and when it gets to the -L argument, set the facility to use
during openlog.
Sure enough, the first attempt on "ipmon -L security -Ds" caused things to
go the way I intended them.
I think this is a bug, but I may be wrong ofcourse.
It's a strange way for things to work properly...
See:
https://sourceforge.net/tracker/index.php?func=detail&aid=1885583&group_id=169098&atid=849053
Darren