diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2010-07-15 06:29:26 +0200 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2010-07-15 06:29:26 +0200 |
commit | 3de510ca436b34d61d45883e75943b813f3af06c (patch) | |
tree | a3fefd680b4fefc3971bafaba56cc800b5f544dc /src | |
parent | 83b957107fc51f6afbde37ff0602498be236a60b (diff) | |
download | strongswan-3de510ca436b34d61d45883e75943b813f3af06c.tar.bz2 strongswan-3de510ca436b34d61d45883e75943b813f3af06c.tar.xz |
Warn about manual plugin load directives for pluto/charon with --disable-load-warning compile option
Diffstat (limited to 'src')
-rw-r--r-- | src/starter/Makefile.am | 4 | ||||
-rw-r--r-- | src/starter/starter.c | 16 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/starter/Makefile.am b/src/starter/Makefile.am index b0941bcbd..9813a0c06 100644 --- a/src/starter/Makefile.am +++ b/src/starter/Makefile.am @@ -39,6 +39,10 @@ if USE_CHARON AM_CFLAGS += -DSTART_CHARON endif +if USE_LOAD_WARNING + AM_CFLAGS += -DLOAD_WARNING +endif + ipsec.conf.5: ipsec.conf.5.in sed \ -e "s:@IPSEC_VERSION@:$(PACKAGE_VERSION):" \ diff --git a/src/starter/starter.c b/src/starter/starter.c index 50ef9c07b..c3ba54f1d 100644 --- a/src/starter/starter.c +++ b/src/starter/starter.c @@ -241,6 +241,7 @@ int main (int argc, char **argv) time_t last_reload; bool no_fork = FALSE; bool attach_gdb = FALSE; + bool load_warning = FALSE; /* global variables defined in log.h */ log_to_stderr = TRUE; @@ -300,6 +301,21 @@ int main (int argc, char **argv) plog("Starting strongSwan "VERSION" IPsec [starter]..."); +#ifdef LOAD_WARNING + load_warning = TRUE; +#endif + + if (lib->settings->get_bool(lib->settings, "starter.load_warning", load_warning)) + { + if (lib->settings->get_str(lib->settings, "charon.load", NULL) || + lib->settings->get_str(lib->settings, "pluto.load", NULL)) + { + plog("!! Your strongswan.conf contains manual plugin load options for"); + plog("!! pluto and/or charon. This is recommended for experts only, see"); + plog("!! http://wiki.strongswan.org/projects/strongswan/wiki/PluginLoad"); + } + } + /* verify that we can start */ if (getuid() != 0) { |