library: Allow specifying the path to strongswan.conf in the STRONGSWAN_CONF env var
authorShea Levy <shea@shealevy.com>
Tue, 30 Sep 2014 18:31:50 +0000 (14:31 -0400)
committerTobias Brunner <tobias@strongswan.org>
Thu, 2 Oct 2014 12:28:01 +0000 (14:28 +0200)
src/libstrongswan/library.c

index 715f5bc..dc73ccc 100644 (file)
@@ -263,7 +263,7 @@ bool library_init(char *settings, const char *namespace)
                        .get = _get,
                        .set = _set,
                        .ns = strdup(namespace ?: "libstrongswan"),
-                       .conf = strdupnull(settings ?: STRONGSWAN_CONF),
+                       .conf = strdupnull(settings ?: (getenv("STRONGSWAN_CONF") ?: STRONGSWAN_CONF)),
                },
                .ref = 1,
        );