aboutsummaryrefslogtreecommitdiffstats
path: root/src/pluto/plutomain.c
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2009-04-16 08:25:47 +0000
committerAndreas Steffen <andreas.steffen@strongswan.org>2009-04-16 08:25:47 +0000
commit6319cd74ea27c9405a8097029b3079693a707a22 (patch)
tree0a6e9511864b5ab6fa165a7d47cbc0e70bd593bf /src/pluto/plutomain.c
parentcfa42285a450be8d969175f9ac35552a2444bf93 (diff)
downloadstrongswan-6319cd74ea27c9405a8097029b3079693a707a22.tar.bz2
strongswan-6319cd74ea27c9405a8097029b3079693a707a22.tar.xz
pluto uses the libstrongswan leak detective and a stripped-down version of library_t
Diffstat (limited to 'src/pluto/plutomain.c')
-rw-r--r--src/pluto/plutomain.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/pluto/plutomain.c b/src/pluto/plutomain.c
index eedbf2532..e46cd9512 100644
--- a/src/pluto/plutomain.c
+++ b/src/pluto/plutomain.c
@@ -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);
}