]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Warn about manual plugin load directives for pluto/charon with --disable-load-warning...
authorAndreas Steffen <andreas.steffen@strongswan.org>
Thu, 15 Jul 2010 04:29:26 +0000 (06:29 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Thu, 15 Jul 2010 04:29:26 +0000 (06:29 +0200)
configure.in
src/starter/Makefile.am
src/starter/starter.c

index db70906ef6328d04bcafb3212a2590a364fe1ecc..d829071ea7574189a34456eed5699fb45ac3b733 100644 (file)
@@ -128,6 +128,7 @@ ARG_ENABL_SET([fast],           [enable libfast (FastCGI Application Server w/ t
 ARG_ENABL_SET([manager],        [enable web management console (proof of concept).])
 ARG_ENABL_SET([mediation],      [enable IKEv2 Mediation Extension.])
 ARG_ENABL_SET([integrity-test], [enable integrity testing of libstrongswan and plugins.])
+ARG_DISBL_SET([load-warning],   [disable the charon/pluto plugin load option warning in starter.])
 ARG_DISBL_SET([pluto],          [disable the IKEv1 keying daemon pluto.])
 ARG_DISBL_SET([xauth],          [disable xauth plugin.])
 ARG_DISBL_SET([threads],        [disable the use of threads in pluto. Charon always uses threads.])
@@ -880,6 +881,7 @@ AM_CONDITIONAL(USE_FAST, test x$fast = xtrue)
 AM_CONDITIONAL(USE_MANAGER, test x$manager = xtrue)
 AM_CONDITIONAL(USE_ME, test x$mediation = xtrue)
 AM_CONDITIONAL(USE_INTEGRITY_TEST, test x$integrity_test = xtrue)
+AM_CONDITIONAL(USE_LOAD_WARNING, test x$load_warning = xtrue)
 AM_CONDITIONAL(USE_PLUTO, test x$pluto = xtrue)
 AM_CONDITIONAL(USE_THREADS, test x$threads = xtrue)
 AM_CONDITIONAL(USE_CHARON, test x$charon = xtrue)
index b0941bcbdb2b1dfa96909623f69a536088bafa5e..9813a0c06f9472ffb89b395ce068d15f6d8d83bc 100644 (file)
@@ -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):" \
index 50ef9c07bbe31058722062635c063a99a52a4bfb..c3ba54f1d3a52c90382d6951c5e22b105fbfb64c 100644 (file)
@@ -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)
        {