summaryrefslogtreecommitdiff
path: root/src/core/execute.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-05-01 10:36:39 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-05-05 11:07:37 +0900
commitaa9d574de9f4817e5c948018f14e02ccca5c0e42 (patch)
treef86060efa9e4a3d9aecab36c8c5bf404800c6567 /src/core/execute.c
parent86c2a9f1c2ea3873e555f0d035bd1fe72a24658a (diff)
downloadsystemd-aa9d574de9f4817e5c948018f14e02ccca5c0e42.tar.gz
load-fragment: allow to specify RestrictNamespaces= multiple times
If multiple RestrictNamespaces= settings are set, then merge the settings. This also drops supporting "~yes" and "~no".
Diffstat (limited to 'src/core/execute.c')
-rw-r--r--src/core/execute.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/execute.c b/src/core/execute.c
index a910eb89a3..87909c07e9 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -3562,7 +3562,8 @@ void exec_context_init(ExecContext *c) {
for (i = 0; i < _EXEC_DIRECTORY_TYPE_MAX; i++)
c->directories[i].mode = 0755;
c->capability_bounding_set = CAP_ALL;
- c->restrict_namespaces = NAMESPACE_FLAGS_ALL;
+ assert_cc(NAMESPACE_FLAGS_INITIAL != NAMESPACE_FLAGS_ALL);
+ c->restrict_namespaces = NAMESPACE_FLAGS_INITIAL;
c->log_level_max = -1;
}