On Jan 21, 2014, at 9:19 AM, Ron Barber <rbar...@yahoo-inc.com> wrote:
> > > On 1/21/14, 10:57 AM, "Igor Galić" <i.ga...@brainsware.org> wrote: > >> >> >> ----- Original Message ----- >>> GitHub user rwbarber2 opened a pull request: >>> >>> https://github.com/apache/trafficserver/pull/34 >>> >>> TS-612 ATS does not allow password protected certificates >>> >>> First attempt at using git to create a pull request..please forgive >>> ignorance if I did it wrong.. >>> >>> Added ink_process.cc with ink_popen() & ink_pclose() functions >>> (which use >>> posix_spawn) to execute the pass phrase dialog program. >>> >>> >>> You can merge this pull request into a Git repository by running: >>> >>> $ git pull https://github.com/rwbarber2/trafficserver master >>> >>> Alternatively you can review and apply these changes as the patch at: >>> >>> https://github.com/apache/trafficserver/pull/34.patch >>> >>> ---- >>> commit 08a676e4253975c56620b738dbd61ccadc718ca7 >>> Author: Ron Barber <rbar...@yahoo-inc.com> >>> Date: 2014-01-20T17:30:20Z >>> >>> TS-612 ATS does not allow password protected certificates >>> >>> ---- >>> >>> >> >> +#if defined(linux) >> + env = environ; >> +#elif defined(darwin) >> + env = *_NSGetEnviron(); >> +#endif >> + >> >> This seems *very* limiting. we support more than those two platforms. >> If memory serves me right, all others should support environ, BUT >> Why would you want to use the environment anyway? You want to use >> a fully-qualified path one way or another and not depend on the >> environment. >> >> My suggestion is to pass an empty environment. > > In creating ink_popen I was trying to replicate much of the functionality > of popen. Since popen forks the parent, the parents environment will be > available to the child process. For this use-case, passing a NULL > environment might be ok, but then again it's possible the pass phrase > program/script needs something from the environment. Other use-cases > might need the environment passed to it so I don't see the harm in it. One reason to pass the environment down might be to preserve records.config override variables https://trafficserver.readthedocs.org/en/latest/reference/configuration/records.config.en.html#environment-overrides