diff options
-rw-r--r-- | scripts/Makefile.am | 1 | ||||
-rw-r--r-- | scripts/dh_speed.c | 2 | ||||
-rw-r--r-- | scripts/key2keyid.c | 2 | ||||
-rw-r--r-- | scripts/keyid2sql.c | 2 | ||||
-rw-r--r-- | scripts/pubkey_speed.c | 2 | ||||
-rw-r--r-- | src/charon/Makefile.am | 1 | ||||
-rw-r--r-- | src/charon/daemon.c | 2 | ||||
-rw-r--r-- | src/charon/plugins/sql/Makefile.am | 1 | ||||
-rw-r--r-- | src/charon/plugins/sql/pool.c | 2 | ||||
-rw-r--r-- | src/libstrongswan/Makefile.am | 2 | ||||
-rw-r--r-- | src/libstrongswan/plugins/plugin_loader.c | 5 | ||||
-rw-r--r-- | src/libstrongswan/plugins/plugin_loader.h | 2 | ||||
-rw-r--r-- | src/manager/Makefile.am | 1 | ||||
-rw-r--r-- | src/manager/main.c | 2 | ||||
-rw-r--r-- | src/medsrv/Makefile.am | 1 | ||||
-rw-r--r-- | src/medsrv/main.c | 2 | ||||
-rw-r--r-- | src/openac/Makefile.am | 1 | ||||
-rwxr-xr-x | src/openac/openac.c | 2 | ||||
-rw-r--r-- | src/pki/Makefile.am | 1 | ||||
-rw-r--r-- | src/pki/pki.c | 2 | ||||
-rw-r--r-- | src/pluto/Makefile.am | 1 | ||||
-rw-r--r-- | src/pluto/plutomain.c | 2 | ||||
-rw-r--r-- | src/scepclient/Makefile.am | 1 | ||||
-rw-r--r-- | src/scepclient/scepclient.c | 2 |
24 files changed, 19 insertions, 23 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 6c28b948f..8a70d79e2 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -1,6 +1,5 @@ INCLUDES = -I$(top_srcdir)/src/libstrongswan AM_CFLAGS = \ --DIPSEC_PLUGINDIR=\"${plugindir}\" \ -DPLUGINS="\"${libstrongswan_plugins}\"" \ -DSTRONGSWAN_CONF=\"${strongswan_conf}\" diff --git a/scripts/dh_speed.c b/scripts/dh_speed.c index 5a57badb6..80a1d2d30 100644 --- a/scripts/dh_speed.c +++ b/scripts/dh_speed.c @@ -102,7 +102,7 @@ int main(int argc, char *argv[]) } library_init(STRONGSWAN_CONF); - lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, argv[1]); + lib->plugins->load(lib->plugins, NULL, argv[1]); atexit(library_deinit); rounds = atoi(argv[2]); diff --git a/scripts/key2keyid.c b/scripts/key2keyid.c index cc3e0b18b..cd6ebc1ed 100644 --- a/scripts/key2keyid.c +++ b/scripts/key2keyid.c @@ -17,7 +17,7 @@ int main(int argc, char *argv[]) int read; library_init(NULL); - lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, PLUGINS); + lib->plugins->load(lib->plugins, NULL, PLUGINS); atexit(library_deinit); read = fread(buf, 1, sizeof(buf), stdin); diff --git a/scripts/keyid2sql.c b/scripts/keyid2sql.c index bf952170d..2d17c273d 100644 --- a/scripts/keyid2sql.c +++ b/scripts/keyid2sql.c @@ -17,7 +17,7 @@ int main(int argc, char *argv[]) int read, n; library_init(NULL); - lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, PLUGINS); + lib->plugins->load(lib->plugins, NULL, PLUGINS); atexit(library_deinit); read = fread(buf, 1, sizeof(buf), stdin); diff --git a/scripts/pubkey_speed.c b/scripts/pubkey_speed.c index 99075d251..b51de0961 100644 --- a/scripts/pubkey_speed.c +++ b/scripts/pubkey_speed.c @@ -60,7 +60,7 @@ int main(int argc, char *argv[]) } library_init(STRONGSWAN_CONF); - lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, argv[1]); + lib->plugins->load(lib->plugins, NULL, argv[1]); atexit(library_deinit); keydata = chunk_create(buf, 0); diff --git a/src/charon/Makefile.am b/src/charon/Makefile.am index 20ca08302..54fc76467 100644 --- a/src/charon/Makefile.am +++ b/src/charon/Makefile.am @@ -106,7 +106,6 @@ INCLUDES = -I${linux_headers} -I$(top_srcdir)/src/libstrongswan -I$(top_srcdir)/ AM_CFLAGS = -rdynamic \ -DIPSEC_DIR=\"${ipsecdir}\" \ -DIPSEC_PIDDIR=\"${piddir}\" \ - -DIPSEC_PLUGINDIR=\"${plugindir}\" \ -DSTRONGSWAN_CONF=\"${strongswan_conf}\" charon_LDADD = $(top_builddir)/src/libstrongswan/libstrongswan.la -lpthread -lm $(DLLIB) $(SOCKLIB) diff --git a/src/charon/daemon.c b/src/charon/daemon.c index 260fc5ead..258043032 100644 --- a/src/charon/daemon.c +++ b/src/charon/daemon.c @@ -491,7 +491,7 @@ static bool initialize(private_daemon_t *this, bool syslog, level_t levels[]) this->public.traps = trap_manager_create(); /* load plugins, further infrastructure may need it */ - if (!lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, + if (!lib->plugins->load(lib->plugins, NULL, lib->settings->get_str(lib->settings, "charon.load", PLUGINS))) { return FALSE; diff --git a/src/charon/plugins/sql/Makefile.am b/src/charon/plugins/sql/Makefile.am index bf4963f29..bbbc5a2e5 100644 --- a/src/charon/plugins/sql/Makefile.am +++ b/src/charon/plugins/sql/Makefile.am @@ -3,7 +3,6 @@ INCLUDES = -I$(top_srcdir)/src/libstrongswan -I$(top_srcdir)/src/charon AM_CFLAGS = -rdynamic \ -DSTRONGSWAN_CONF=\"${strongswan_conf}\" \ - -DIPSEC_PLUGINDIR=\"${plugindir}\" \ -DPLUGINS=\""${libstrongswan_plugins}\"" plugin_LTLIBRARIES = libstrongswan-sql.la diff --git a/src/charon/plugins/sql/pool.c b/src/charon/plugins/sql/pool.c index c029dea24..d59c4c811 100644 --- a/src/charon/plugins/sql/pool.c +++ b/src/charon/plugins/sql/pool.c @@ -634,7 +634,7 @@ int main(int argc, char *argv[]) fprintf(stderr, "integrity check of pool failed\n"); exit(SS_RC_DAEMON_INTEGRITY); } - if (!lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, + if (!lib->plugins->load(lib->plugins, NULL, lib->settings->get_str(lib->settings, "pool.load", PLUGINS))) { exit(SS_RC_INITIALIZATION_FAILED); diff --git a/src/libstrongswan/Makefile.am b/src/libstrongswan/Makefile.am index 570c14e40..ebf7e4e9a 100644 --- a/src/libstrongswan/Makefile.am +++ b/src/libstrongswan/Makefile.am @@ -54,7 +54,7 @@ libstrongswan_la_LIBADD = -lpthread $(DLLIB) $(BTLIB) $(SOCKLIB) $(RTLIB) INCLUDES = -I$(top_srcdir)/src/libstrongswan AM_CFLAGS = \ -DIPSEC_DIR=\"${ipsecdir}\" \ --DIPSEC_PLUGINDIR=\"${plugindir}\" +-DPLUGINDIR=\"${plugindir}\" if USE_LEAK_DETECTIVE AM_CFLAGS += -DLEAK_DETECTIVE diff --git a/src/libstrongswan/plugins/plugin_loader.c b/src/libstrongswan/plugins/plugin_loader.c index 644ac1fd2..d4513f25a 100644 --- a/src/libstrongswan/plugins/plugin_loader.c +++ b/src/libstrongswan/plugins/plugin_loader.c @@ -116,6 +116,11 @@ static bool load(private_plugin_loader_t *this, char *path, char *list) char *token; bool critical_failed = FALSE; + if (path == NULL) + { + path = PLUGINDIR; + } + enumerator = enumerator_create_token(list, " ", " "); while (!critical_failed && enumerator->enumerate(enumerator, &token)) { diff --git a/src/libstrongswan/plugins/plugin_loader.h b/src/libstrongswan/plugins/plugin_loader.h index 0967b7900..f72c91c60 100644 --- a/src/libstrongswan/plugins/plugin_loader.h +++ b/src/libstrongswan/plugins/plugin_loader.h @@ -37,7 +37,7 @@ struct plugin_loader_t { * as a critical plugin. If loading a critical plugin fails, plugin loading * is aborted and FALSE is returned. * - * @param path path containing loadable plugins + * @param path path containing loadable plugins, NULL for default * @param list space separated list of plugins to load * @return TRUE if all critical plugins loaded successfully */ diff --git a/src/manager/Makefile.am b/src/manager/Makefile.am index 6c50f1563..b5948c0a8 100644 --- a/src/manager/Makefile.am +++ b/src/manager/Makefile.am @@ -17,7 +17,6 @@ AM_CFLAGS = -rdynamic \ -DSTRONGSWAN_CONF=\"${strongswan_conf}\" \ -DIPSECDIR=\"${ipsecdir}\" \ -DIPSEC_PIDDIR=\"${piddir}\" \ - -DIPSEC_PLUGINDIR=\"${plugindir}\"\ -DPLUGINS=\""${libstrongswan_plugins}\"" # Don't forget to add templates to EXTRA_DIST !!! How to automate? diff --git a/src/manager/main.c b/src/manager/main.c index 9152f56ba..990beda4d 100644 --- a/src/manager/main.c +++ b/src/manager/main.c @@ -35,7 +35,7 @@ int main (int arc, char *argv[]) int threads, timeout; library_init(STRONGSWAN_CONF); - if (!lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, + if (!lib->plugins->load(lib->plugins, NULL, lib->settings->get_str(lib->settings, "manager.load", PLUGINS))) { return 1; diff --git a/src/medsrv/Makefile.am b/src/medsrv/Makefile.am index 8a0703e11..be9360bca 100644 --- a/src/medsrv/Makefile.am +++ b/src/medsrv/Makefile.am @@ -14,7 +14,6 @@ AM_CFLAGS = -rdynamic \ -DSTRONGSWAN_CONF=\"${strongswan_conf}\" \ -DIPSECDIR=\"${ipsecdir}\" \ -DIPSEC_PIDDIR=\"${piddir}\" \ - -DIPSEC_PLUGINDIR=\"${plugindir}\"\ -DPLUGINS=\""${libstrongswan_plugins}\"" # Don't forget to add templates to EXTRA_DIST !!! How to automate? diff --git a/src/medsrv/main.c b/src/medsrv/main.c index d66d01ecf..15d1f7fb8 100644 --- a/src/medsrv/main.c +++ b/src/medsrv/main.c @@ -34,7 +34,7 @@ int main(int arc, char *argv[]) int timeout, threads; library_init(STRONGSWAN_CONF); - if (!lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, + if (!lib->plugins->load(lib->plugins, NULL, lib->settings->get_str(lib->settings, "medsrv.load", PLUGINS))) { return 1; diff --git a/src/openac/Makefile.am b/src/openac/Makefile.am index b71e6a0e1..e36b623ba 100644 --- a/src/openac/Makefile.am +++ b/src/openac/Makefile.am @@ -6,7 +6,6 @@ INCLUDES = -I$(top_srcdir)/src/libstrongswan AM_CFLAGS = \ -DIPSEC_CONFDIR=\"${sysconfdir}\" \ -DSTRONGSWAN_CONF=\"${strongswan_conf}\" \ - -DIPSEC_PLUGINDIR=\"${plugindir}\" \ -DPLUGINS=\""${libstrongswan_plugins}\"" openac_LDADD = $(top_builddir)/src/libstrongswan/libstrongswan.la diff --git a/src/openac/openac.c b/src/openac/openac.c index 99af1774f..de95643af 100755 --- a/src/openac/openac.c +++ b/src/openac/openac.c @@ -231,7 +231,7 @@ int main(int argc, char **argv) fprintf(stderr, "integrity check of openac failed\n"); exit(SS_RC_DAEMON_INTEGRITY); } - if (!lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, + if (!lib->plugins->load(lib->plugins, NULL, lib->settings->get_str(lib->settings, "openac.load", PLUGINS))) { exit(SS_RC_INITIALIZATION_FAILED); diff --git a/src/pki/Makefile.am b/src/pki/Makefile.am index 3f2694d97..7eb579502 100644 --- a/src/pki/Makefile.am +++ b/src/pki/Makefile.am @@ -7,6 +7,5 @@ pki_SOURCES = pki.c pki.h command.c command.h \ pki_LDADD = $(top_builddir)/src/libstrongswan/libstrongswan.la INCLUDES = -I$(top_srcdir)/src/libstrongswan AM_CFLAGS = \ - -DPLUGINDIR=\"${plugindir}\" \ -DPLUGINS=\""${libstrongswan_plugins}\"" \ -DSTRONGSWAN_CONF=\"${strongswan_conf}\" diff --git a/src/pki/pki.c b/src/pki/pki.c index 896ad9da7..aa873a49e 100644 --- a/src/pki/pki.c +++ b/src/pki/pki.c @@ -89,7 +89,7 @@ int main(int argc, char *argv[]) fprintf(stderr, "integrity check of pki failed\n"); exit(SS_RC_DAEMON_INTEGRITY); } - if (!lib->plugins->load(lib->plugins, PLUGINDIR, + if (!lib->plugins->load(lib->plugins, NULL, lib->settings->get_str(lib->settings, "pki.load", PLUGINS))) { exit(SS_RC_INITIALIZATION_FAILED); diff --git a/src/pluto/Makefile.am b/src/pluto/Makefile.am index bac51e2e2..77d366b36 100644 --- a/src/pluto/Makefile.am +++ b/src/pluto/Makefile.am @@ -68,7 +68,6 @@ AM_CFLAGS = \ -DIPSEC_CONFDIR=\"${sysconfdir}\" \ -DIPSEC_PIDDIR=\"${piddir}\" \ -DSHARED_SECRETS_FILE=\"${confdir}/ipsec.secrets\" \ --DIPSEC_PLUGINDIR=\"${plugindir}\" \ -DPLUGINS=\""${pluto_plugins}\"" \ -DSTRONGSWAN_CONF=\"${strongswan_conf}\" \ -DPKCS11_DEFAULT_LIB=\"${default_pkcs11}\" \ diff --git a/src/pluto/plutomain.c b/src/pluto/plutomain.c index 0de8d4d5d..18e8228df 100644 --- a/src/pluto/plutomain.c +++ b/src/pluto/plutomain.c @@ -652,7 +652,7 @@ int main(int argc, char **argv) } /* load plugins, further infrastructure may need it */ - if (!lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, + if (!lib->plugins->load(lib->plugins, NULL, lib->settings->get_str(lib->settings, "pluto.load", PLUGINS))) { exit(SS_RC_INITIALIZATION_FAILED); diff --git a/src/scepclient/Makefile.am b/src/scepclient/Makefile.am index 063806916..8a2837d5f 100644 --- a/src/scepclient/Makefile.am +++ b/src/scepclient/Makefile.am @@ -17,7 +17,6 @@ INCLUDES = \ AM_CFLAGS = \ -DIPSEC_CONFDIR=\"${sysconfdir}\" \ --DIPSEC_PLUGINDIR=\"${plugindir}\" \ -DPLUGINS=\""${pluto_plugins}\"" \ -DSTRONGSWAN_CONF=\"${strongswan_conf}\" \ -DDEBUG -DNO_PLUTO diff --git a/src/scepclient/scepclient.c b/src/scepclient/scepclient.c index 7a9e1ff48..4b9c02e36 100644 --- a/src/scepclient/scepclient.c +++ b/src/scepclient/scepclient.c @@ -759,7 +759,7 @@ int main(int argc, char **argv) init_log("scepclient"); /* load plugins, further infrastructure may need it */ - if (!lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, + if (!lib->plugins->load(lib->plugins, NULL, lib->settings->get_str(lib->settings, "scepclient.load", PLUGINS))) { exit_scepclient("plugin loading failed"); |