swanctl: Make credential directories relative to swanctl.conf
authorTobias Brunner <tobias@strongswan.org>
Wed, 12 Dec 2018 10:30:09 +0000 (11:30 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 14 Dec 2018 08:11:14 +0000 (09:11 +0100)
commit501bd53a6cce6c0c8a70a2e50440655e580a6447
treeed8da1bf4912f4148454ebd8f39baaafe7a1ac73
parent322daff844c1c479e12dc261e37d94adde3f5d93
swanctl: Make credential directories relative to swanctl.conf

All directories are now considered relative to the loaded swanctl.conf
file, in particular, when loading it from a custom location via --file
argument.  The base directory, which is used if no custom location for
swanctl.conf is specified, is now also configurable at runtime via
SWANCTL_DIR environment variable.

Closes strongswan/strongswan#120.
src/swanctl/commands/load_all.c
src/swanctl/commands/load_authorities.c
src/swanctl/commands/load_conns.c
src/swanctl/commands/load_creds.c
src/swanctl/commands/load_pools.c
src/swanctl/swanctl.c
src/swanctl/swanctl.h