pluto uses the libstrongswan leak detective and a stripped-down version of library_t

This commit is contained in:
Andreas Steffen
2009-04-16 08:25:47 +00:00
parent cfa42285a4
commit 6319cd74ea
13 changed files with 196 additions and 145 deletions
+4 -12
View File
@@ -38,7 +38,7 @@
#endif /* CAPABILITIES */
#include <freeswan.h>
#include <settings.h>
#include <library.h>
#include <pfkeyv2.h>
#include <pfkey.h>
@@ -198,9 +198,6 @@ delete_lock(void)
}
}
/* settings defined by strongswan.conf */
settings_t *settings;
/* by default pluto sends certificate requests to its peers */
bool no_cr_send = FALSE;
@@ -242,9 +239,7 @@ main(int argc, char **argv)
cap_t caps;
int keep[] = { CAP_NET_ADMIN, CAP_NET_BIND_SERVICE };
#endif /* CAPABILITIES */
/* getting settings from strongswan.conf */
settings = settings_create(STRONGSWAN_CONF);
library_init(STRONGSWAN_CONF);
/* handle arguments */
for (;;)
@@ -626,7 +621,6 @@ main(int argc, char **argv)
init_fetch();
/* drop unneeded capabilities and change UID/GID */
prctl(PR_SET_KEEPCAPS, 1);
#ifdef IPSEC_GROUP
@@ -710,13 +704,11 @@ exit_pluto(int status)
free_ifaces();
scx_finalize(); /* finalize and unload PKCS #11 module */
xauth_finalize(); /* finalize and unload XAUTH module */
settings->destroy(settings);
stop_adns();
free_md_pool();
free_crypto();
delete_lock();
#ifdef LEAK_DETECTIVE
report_leaks();
#endif /* LEAK_DETECTIVE */
library_deinit();
close_log();
exit(status);
}