diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/charon/Makefile.am | 13 | ||||
-rw-r--r-- | src/charon/daemon.c | 3 | ||||
-rw-r--r-- | src/charon/plugins/sql/Makefile.am | 3 | ||||
-rw-r--r-- | src/charon/plugins/sql/pool.c | 3 | ||||
-rw-r--r-- | src/libstrongswan/plugins/plugin_loader.c | 8 | ||||
-rw-r--r-- | src/manager/Makefile.am | 2 | ||||
-rw-r--r-- | src/manager/main.c | 3 | ||||
-rw-r--r-- | src/openac/Makefile.am | 2 | ||||
-rwxr-xr-x | src/openac/openac.c | 3 | ||||
-rw-r--r-- | src/strongswan.conf | 15 |
10 files changed, 28 insertions, 27 deletions
diff --git a/src/charon/Makefile.am b/src/charon/Makefile.am index 0f17c9642..9d0e64879 100644 --- a/src/charon/Makefile.am +++ b/src/charon/Makefile.am @@ -129,44 +129,57 @@ endif ######################## SUBDIRS = . +PLUGINS = ${libstrongswan_plugins} if USE_UNIT_TESTS SUBDIRS += plugins/unit_tester + PLUGINS += unit-tester endif if USE_STROKE SUBDIRS += plugins/stroke + PLUGINS += stroke endif if USE_SMP SUBDIRS += plugins/smp + PLUGINS += smb endif if USE_SQL SUBDIRS += plugins/sql + PLUGINS += sql endif if USE_EAP_IDENTITY SUBDIRS += plugins/eap_identity + PLUGINS += eap-identity endif if USE_EAP_SIM SUBDIRS += plugins/eap_sim + PLUGINS += eap-sim endif if USE_EAP_MD5 SUBDIRS += plugins/eap_md5 + PLUGINS += eap-md5 endif if USE_EAP_AKA SUBDIRS += plugins/eap_aka + PLUGINS += eap-aka endif if USE_MEDSRV SUBDIRS += plugins/medsrv + PLUGINS += medsrv endif if USE_MEDCLI SUBDIRS += plugins/medcli + PLUGINS += medcli endif +AM_CFLAGS += -DPLUGINS=\""${PLUGINS}\"" + diff --git a/src/charon/daemon.c b/src/charon/daemon.c index 2eb0d2eba..9406e89ea 100644 --- a/src/charon/daemon.c +++ b/src/charon/daemon.c @@ -382,8 +382,7 @@ static bool initialize(private_daemon_t *this, bool syslog, level_t levels[]) /* load plugins, further infrastructure may need it */ lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, - lib->settings->get_str(lib->settings, "charon.load", - "aes des gmp hmac md5 random sha1 sha2 pubkey x509 xcbc stroke")); + lib->settings->get_str(lib->settings, "charon.load", PLUGINS)); this->public.ike_sa_manager = ike_sa_manager_create(); if (this->public.ike_sa_manager == NULL) diff --git a/src/charon/plugins/sql/Makefile.am b/src/charon/plugins/sql/Makefile.am index 7dc42c181..d412980ef 100644 --- a/src/charon/plugins/sql/Makefile.am +++ b/src/charon/plugins/sql/Makefile.am @@ -1,7 +1,8 @@ INCLUDES = -I$(top_srcdir)/src/libstrongswan -I$(top_srcdir)/src/charon -AM_CFLAGS = -rdynamic -DIPSEC_PLUGINDIR=\"${plugindir}\" +AM_CFLAGS = -rdynamic \ + -DIPSEC_PLUGINDIR=\"${plugindir}\" -DPLUGINS=\""${libstrongswan_plugins}\"" plugin_LTLIBRARIES = libstrongswan-sql.la libstrongswan_sql_la_SOURCES = sql_plugin.h sql_plugin.c \ diff --git a/src/charon/plugins/sql/pool.c b/src/charon/plugins/sql/pool.c index 40ff6bc55..43a4f33ab 100644 --- a/src/charon/plugins/sql/pool.c +++ b/src/charon/plugins/sql/pool.c @@ -359,8 +359,7 @@ int main(int argc, char *argv[]) library_init(STRONGSWAN_CONF); atexit(library_deinit); lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, - lib->settings->get_str(lib->settings, "pool.load", - "sqlite mysql")); + lib->settings->get_str(lib->settings, "pool.load", PLUGINS)); uri = lib->settings->get_str(lib->settings, "charon.plugins.sql.database", NULL); if (!uri) diff --git a/src/libstrongswan/plugins/plugin_loader.c b/src/libstrongswan/plugins/plugin_loader.c index 5734c9092..6c25cfbe2 100644 --- a/src/libstrongswan/plugins/plugin_loader.c +++ b/src/libstrongswan/plugins/plugin_loader.c @@ -100,7 +100,11 @@ static int load(private_plugin_loader_t *this, char *path, char *list) pos = strchr(list, ' '); if (pos) { - *pos = '\0'; + *pos++ = '\0'; + while (*pos == ' ') + { + pos++; + } } plugin = load_plugin(this, path, list); if (plugin) @@ -112,7 +116,7 @@ static int load(private_plugin_loader_t *this, char *path, char *list) { break; } - list = pos + 1; + list = pos; } return count; } diff --git a/src/manager/Makefile.am b/src/manager/Makefile.am index 3e27d5ca2..bcf168f53 100644 --- a/src/manager/Makefile.am +++ b/src/manager/Makefile.am @@ -12,7 +12,7 @@ manager_fcgi_LDADD = $(top_builddir)/src/libfast/libfast.la ${xml_LIBS} INCLUDES = -I$(top_srcdir)/src/libstrongswan -I$(top_srcdir)/src/libfast ${xml_CFLAGS} AM_CFLAGS = -rdynamic -DIPSECDIR=\"${ipsecdir}\" -DIPSEC_PIDDIR=\"${piddir}\" \ - -DIPSEC_PLUGINDIR=\"${plugindir}\" + -DIPSEC_PLUGINDIR=\"${plugindir}\" -DPLUGINS=\""${libstrongswan_plugins}\"" # Don't forget to add templates to EXTRA_DIST !!! How to automate? ipsec_templatesdir = ${ipsecdir}/templates diff --git a/src/manager/main.c b/src/manager/main.c index 08f05e548..cfecc71ba 100644 --- a/src/manager/main.c +++ b/src/manager/main.c @@ -38,8 +38,7 @@ int main (int arc, char *argv[]) library_init(STRONGSWAN_CONF); lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, - lib->settings->get_str(lib->settings, "manager.load", - "random sha1 sqlite")); + lib->settings->get_str(lib->settings, "manager.load", PLUGINS)); socket = lib->settings->get_str(lib->settings, "manager.socket", NULL); debug = lib->settings->get_bool(lib->settings, "manager.debug", FALSE); diff --git a/src/openac/Makefile.am b/src/openac/Makefile.am index 84f2d646d..2890c75aa 100644 --- a/src/openac/Makefile.am +++ b/src/openac/Makefile.am @@ -4,6 +4,6 @@ dist_man_MANS = openac.8 INCLUDES = -I$(top_srcdir)/src/libstrongswan AM_CFLAGS = -DIPSEC_CONFDIR=\"${confdir}\" \ - -DIPSEC_PLUGINDIR=\"${plugindir}\" + -DIPSEC_PLUGINDIR=\"${plugindir}\" -DPLUGINS=\""${libstrongswan_plugins}\"" openac_LDADD = $(top_builddir)/src/libstrongswan/libstrongswan.la -lgmp diff --git a/src/openac/openac.c b/src/openac/openac.c index 2ef898996..e0f07fb08 100755 --- a/src/openac/openac.c +++ b/src/openac/openac.c @@ -268,8 +268,7 @@ int main(int argc, char **argv) /* initialize library */ library_init(STRONGSWAN_CONF); lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, - lib->settings->get_str(lib->settings, "openac.load", - "gmp hmac md5 random sha1 sha2 pubkey x509")); + lib->settings->get_str(lib->settings, "openac.load", PLUGINS)); /* initialize optionsfrom */ options_t *options = options_create(); diff --git a/src/strongswan.conf b/src/strongswan.conf index 5b6ecb7ea..661792a67 100644 --- a/src/strongswan.conf +++ b/src/strongswan.conf @@ -6,7 +6,7 @@ charon { threads = 16 # plugins to load in charon - load = aes des gmp hmac md5 random sha1 sha2 pubkey xcbc stroke + # load = aes des gmp hmac md5 random sha1 sha2 pubkey xcbc x509 stroke plugins { @@ -23,16 +23,3 @@ charon { # ... } - -pool { - # choose one - load = mysql sqlite -} - -manager { - load = sha1 random sqlite -} - -openac { - load = gmp hmac md5 random sha1 sha2 pubkey x509 -} |