Hi, On Fri, Apr 13, 2018 at 12:34:15PM -0700, Micah Morton wrote: > @gert: > > From the help message: "--setenv name value : Set a custom environmental > variable to pass to script." > > --setenv appears to set string values for scripts only, not for the main > openvpn process (which is reading them in the push_peer_info() function). > Starting a test openvpn server with `--setenv foo bar` and then running > `strings` on /proc/PID/environ doesn't show "foo=bar". This suggests that > getenv() calls in the main openvpn process that try to read these vars may > return NULL.
This stuff isn't pushed into openvpn's own environment, because it does
not need to. It goes into session->opt->es, which basically is a linked
list of "NAME=VALUE" strings (and ssl.c / push_peer_info() walks that).
When external programs are called, opt->es is put into *their* environment.
gert
--
"If was one thing all people took for granted, was conviction that if you
feed honest figures into a computer, honest figures come out. Never doubted
it myself till I met a computer with a sense of humor."
Robert A. Heinlein, The Moon is a Harsh Mistress
Gert Doering - Munich, Germany [email protected]
signature.asc
Description: PGP signature
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
