aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs/ikiwiki_ignores_PATH_environment.mdwn
blob: 5097acaef5c2de5fe74208ee8436f59f2a282351 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
At the very top of the main ikiwiki executable script the `PATH` environment is set like this:

    $ENV{PATH}="/usr/local/bin:/usr/bin:/bin:/opt/local/bin";

This makes it a little hard to specify which specific binaries should be used, especially if there is more than one of them available (see c.f. <http://trac.macports.org/ticket/26333> where the MacPorts-supplied, up-to-date subversion should be used and not an arcane one from the base distro / OS). Is there a specific reason why ikiwiki wipes out `$PATH` like this or could that line be improved to

    $ENV{PATH}="$ENV{PATH}:/usr/local/bin:/usr/bin:/bin:/opt/local/bin";

? The alternative is of course to patch ikiwiki as suggested in the bug, but I wanted to ask here first :)

> You can use the ENV setting in your setup file to set any environment
> variables you like. Since ikiwiki.cgi is run by the web browser, that
> is the best way to ensure ikiwiki always runs with a given variable set.
> 
> As a suid program, the ikiwiki wrappers have to sanitize the environment.
> The ikiwiki script's own sanitization of PATH was done to make perl taint
> checking happy, but as taint checking is disabled anyway, I have removed
> that. [[done]] --[[Joey]]