check success of library_init()

This commit is contained in:
Andreas Steffen
2009-08-14 22:13:51 +02:00
parent f1777dff59
commit 2f5b1e0eb7
3 changed files with 19 additions and 4 deletions
+5 -1
View File
@@ -282,7 +282,11 @@ int main(int argc, char **argv)
openlog("openac", 0, LOG_AUTHPRIV);
/* initialize library */
library_init(STRONGSWAN_CONF);
if (!library_init(STRONGSWAN_CONF))
{
library_deinit();
exit(SS_RC_LIBSTRONGSWAN_INTEGRITY);
}
lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR,
lib->settings->get_str(lib->settings, "openac.load", PLUGINS));