library: Allow specifying the path to strongswan.conf in the STRONGSWAN_CONF env var

This commit is contained in:
Shea Levy 2014-09-30 14:31:50 -04:00 committed by Tobias Brunner
parent 0efea2fd86
commit 5fea45506e

View 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,
);