[strongSwan] How to avoid the parsing of strongswan.conf file and set the configuration options programmatically?

Martin Willi martin at strongswan.org
Wed Apr 22 15:58:20 CEST 2015


>   set_strongswan_conf_options(lfile);
>   system("starter --daemon charon");

You can't set options in the current process, and then expect that these
options get inherited to a child process spawned using system() or any
exec*() function.

If you want to set strongswan.conf options programatically, you'll have
to do that early in the process you want to control, for example in
charons main(). Some libcharon based programs already do that, for
example charon-xpc under src/frontends/osx.


More information about the Users mailing list