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
+2 -2
View File
@@ -263,14 +263,14 @@ int main(int argc, char **argv)
if (!library_init(STRONGSWAN_CONF))
{
library_deinit();
abort();
exit(SS_RC_LIBSTRONGSWAN_INTEGRITY);
}
if (lib->integrity &&
!lib->integrity->check_file(lib->integrity, "pluto", argv[0]))
{
fprintf(stderr, "integrity check of pluto failed\n");
library_deinit();
abort();
exit(SS_RC_DAEMON_INTEGRITY);
}
options = options_create();