added ./configure option --with-strongswan-conf=
authorMartin Willi <martin@strongswan.org>
Mon, 7 Apr 2008 06:56:33 +0000 (06:56 -0000)
committerMartin Willi <martin@strongswan.org>
Mon, 7 Apr 2008 06:56:33 +0000 (06:56 -0000)
defaults to /etc/strongswan.conf

configure.in
src/charon/daemon.c
src/libstrongswan/fips/fips_signer.c
src/manager/main.c
src/openac/Makefile.am
src/openac/openac.c

index 8a7f171..9e0de9c 100644 (file)
@@ -53,6 +53,13 @@ AC_ARG_WITH(
 )
 
 AC_ARG_WITH(
+       [strongswan-conf],
+       AS_HELP_STRING([--with-strongswan-conf=file],[strongswan.conf file other than "sysconfdir/strongswan.conf"]),
+       [AC_DEFINE_UNQUOTED(STRONGSWAN_CONF, "$withval")],
+       [AC_DEFINE_UNQUOTED(STRONGSWAN_CONF, "${sysconfdir}/strongswan.conf")]
+)
+
+AC_ARG_WITH(
        [urandom-device],
        AS_HELP_STRING([--with-urandom-device=dev],[set the device for pseudo random data other than "/dev/urandom"]),
        [AC_DEFINE_UNQUOTED(DEV_URANDOM, "$withval")],
index 12fc206..689bad9 100644 (file)
@@ -486,7 +486,7 @@ int main(int argc, char *argv[])
        dbg = dbg_silent;
        
        /* initialize library */
-       library_init(IPSEC_DIR "/strongswan.conf");
+       library_init(STRONGSWAN_CONF);
        lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, "libstrongswan-");
        lib->printf_hook->add_handler(lib->printf_hook, 'R',
                                                                  traffic_selector_get_printf_hooks());
index 276e55e..a458c16 100644 (file)
@@ -27,7 +27,7 @@ int main(int argc, char* argv[])
        char  hmac_signature[BUF_LEN];
 
        /* initialize library */
-       library_init(IPSEC_DIR "/strongswan.conf");
+       library_init(STRONGSWAN_CONF);
        lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, "libstrongswan-");
 
        if (!fips_compute_hmac_signature(hmac_key, hmac_signature))
index 981f92f..03a9f58 100644 (file)
@@ -36,7 +36,7 @@ int main (int arc, char *argv[])
        bool debug;
        int threads, timeout;
 
-       library_init(IPSECDIR "/strongswan.conf");
+       library_init(STRONGSWAN_CONF);
        lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, "libstrongswan-");
        
        socket = lib->settings->get_str(lib->settings, "manager.socket", NULL);
index 433fe51..84f2d64 100644 (file)
@@ -4,7 +4,6 @@ dist_man_MANS = openac.8
 
 INCLUDES = -I$(top_srcdir)/src/libstrongswan
 AM_CFLAGS = -DIPSEC_CONFDIR=\"${confdir}\" \
-            -DIPSEC_DIR=\"${ipsecdir}\" \
                -DIPSEC_PLUGINDIR=\"${plugindir}\"
 openac_LDADD = $(top_builddir)/src/libstrongswan/libstrongswan.la -lgmp
 
index b79f4cd..b16b53b 100755 (executable)
@@ -267,7 +267,7 @@ int main(int argc, char **argv)
        openlog("openac", 0, LOG_AUTHPRIV);
 
        /* initialize library */
-       library_init(IPSEC_DIR "/strongswan.conf");
+       library_init(STRONGSWAN_CONF);
        lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, "libstrongswan-");
 
        /* initialize optionsfrom */