#30 Clear process environment variables when DaemonContext opens
Opened by bignose. Modified

Please clear the process environment variables when the DaemonContext opens.

The LSB manual page daemon(7) recommends:

When a traditional SysV daemon starts, it should execute the following steps
as part of the initialization.
[]
    4. Sanitize the environment block, removing or resetting environment variables that
        might negatively impact daemon runtime.
[]

This should also have an exclusion list – a set of variables that will be preserved – allowing the program to specify which variables will not be cleared from the process environment.


A suggested name for the “set of variables that will be preserved” is (similar to the existing option files_preserve) a new option named environment_preserve, a collection of variable names.

Metadata