1 |
> init.d scripts should have a pure env given to them ... which means, they |
2 |
> should be run with `env -i` and have only whitelisted variables given to them |
3 |
> (and everything that appears in /etc/conf.d/$service /etc/conf.d/rc |
4 |
> and /etc/rc.conf) ... |
5 |
|
6 |
Now that may be too few variables. At least the variable LANG (or |
7 |
whatever the system-admin may chose to set) could be seen as a |
8 |
system-wide language-setting. It could be intentional, that at least |
9 |
some variables are available to the started server-processes. Especially |
10 |
a system-wide language-setting would be a good idea. |
11 |
|
12 |
After all, there's one point: |
13 |
The 2 possible situations (init-script started by root-shell, |
14 |
init-script started at by init-process) because of at least 2 reasons: |
15 |
|
16 |
- less side-effects |
17 |
- and of course the reason vapier mentiones: |
18 |
|
19 |
> after all, you wouldnt want something like apache having all those vars in its |
20 |
> env because they'd show up in php script env which means available to the |
21 |
> public |