|
From: Richard J. <rjt...@sa...> - 2015-02-16 02:12:43
|
On Sun, Feb 15, 2015 at 05:19:51PM -0700, Richard Johnson wrote:
> On OpenBSD 5.6, I'm seeing sshguard 1.5.0 stopping nearly immediately upon
> start at boot time. Typical log entries:
>
> Feb 15 16:17:46 host sshguard[765]: Started successfully [(a,p,s)=(40, 420, 1200)], now ready to scan.
> Feb 15 16:17:47 host sshguard[765]: Got exit signal, flushing blocked addresses and exiting...
>
> And sshguard is indeed no longer running. A later manual start of sshguard
> succeeds.
sshguard.c includes SIGHUP in its signals upon which to terminate.
The rc.d startup of sshguard at boot on OpenBSD (and FreeBSD) apparently
comes with a HUP. Sheer guessing here, but this may be because sshguard
has the log file open at the time an initial newsyslog run occurs.
Here's a quick workaround that'll hopefully hold me until there's more time
for reading code and figuring out how to avoid HUPing sshguard at boot
time. It effectively ignores SIGHUP. Confirmed that on OpenBSD 5.6 stable
sshguard is still shut down cleanly at reboot time, as well as stops and
starts fine via /etc/rc.d/sshguard stop|start|restart.
=======
--- src/sshguard.c.orig Wed Feb 9 05:01:47 2011
+++ src/sshguard.c Sun Feb 15 18:30:59 2015
@@ -200,7 +200,6 @@
/* termination signals */
signal(SIGTERM, sigfin_handler);
- signal(SIGHUP, sigfin_handler);
signal(SIGINT, sigfin_handler);
/* load blacklisted addresses and block them (if requested) */
=======
Richard
|