stop strongswan if integrity check of libstrongswan or daemon fails

This commit is contained in:
Andreas Steffen
2009-07-17 20:33:19 +02:00
parent 6b04ba288d
commit eab241fb56
8 changed files with 49 additions and 25 deletions
+8 -1
View File
@@ -42,11 +42,18 @@ starter_pluto_pid(void)
}
void
starter_pluto_sigchild(pid_t pid)
starter_pluto_sigchild(pid_t pid, int status)
{
if (pid == _pluto_pid)
{
_pluto_pid = 0;
if (status == SS_RC_LIBSTRONGSWAN_INTEGRITY ||
status == SS_RC_DAEMON_INTEGRITY)
{
plog("pluto has quit: integrity test of %s failed",
(status == 64) ? "libstrongswan" : "pluto");
_stop_requested = 1;
}
if (!_stop_requested)
{
plog("pluto has died -- restart scheduled (%dsec)"