core: add new UnsetEnvironment= setting for unit files

With this setting we can explicitly unset specific variables for
processes of a unit, as last step of assembling the environment block
for them. This is useful to fix #6407.

While we are at it, greatly expand the documentation on how the
environment block for forked off processes is assembled.
This commit is contained in:
Lennart Poettering
2017-09-14 15:17:40 +02:00
parent dbbf424c8b
commit 00819cc151
8 changed files with 227 additions and 40 deletions
+1
View File
@@ -133,6 +133,7 @@ struct ExecContext {
char **environment;
char **environment_files;
char **pass_environment;
char **unset_environment;
struct rlimit *rlimit[_RLIMIT_MAX];
char *working_directory, *root_directory, *root_image;