libimcv: Fix harcoded IMCV_DEFAULT_POLICY_SCRIPT name
authorAvesh Agarwal <avesh.ncsu@gmail.com>
Mon, 13 Oct 2014 14:15:33 +0000 (16:15 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 13 Oct 2014 14:15:33 +0000 (16:15 +0200)
I came across an issue with src/libimcv/imcv.c where
IMCV_DEFAULT_POLICY_SCRIPT is hardcoded.

It fails where ipsec_script is renamed to, for example, strongswan from
default ipsec.

src/libimcv/Makefile.am
src/libimcv/imcv.c

index 2640f4c..1094213 100644 (file)
@@ -1,7 +1,8 @@
 AM_CPPFLAGS = \
        -I$(top_srcdir)/src/libstrongswan \
        -I$(top_srcdir)/src/libtncif \
-       -I$(top_srcdir)/src/libpts
+       -I$(top_srcdir)/src/libpts \
+       -DIPSEC_SCRIPT=\"${ipsec_script}\"
 
 ipseclib_LTLIBRARIES = libimcv.la
 
index 703da23..619fc8d 100644 (file)
@@ -33,7 +33,7 @@
 #endif
 
 #define IMCV_DEBUG_LEVEL                       1
-#define IMCV_DEFAULT_POLICY_SCRIPT     "ipsec _imv_policy"
+#define IMCV_DEFAULT_POLICY_SCRIPT     IPSEC_SCRIPT " _imv_policy"
 
 
 /**