diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-05-24 16:49:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-24 16:49:13 +0200 |
commit | cdc0f9be925c79f52452938f39013062325da27a (patch) | |
tree | dfd01079f60ca2b6cc85baa298911a7bb375dae9 /src/core/execute.c | |
parent | networkd: Support the ability to set MTU in [Route] sections (diff) | |
parent | man: fix merging rule for CapabilityBoundingSet= (diff) | |
download | systemd-cdc0f9be925c79f52452938f39013062325da27a.tar.xz systemd-cdc0f9be925c79f52452938f39013062325da27a.zip |
Merge pull request #8817 from yuwata/cleanup-nsflags
core: allow to specify RestrictNamespaces= multiple times
Diffstat (limited to 'src/core/execute.c')
-rw-r--r-- | src/core/execute.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/execute.c b/src/core/execute.c index 8cb16eb49b..939bc12b56 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -3548,7 +3548,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; } @@ -4250,7 +4251,7 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) { if (exec_context_restrict_namespaces_set(c)) { _cleanup_free_ char *s = NULL; - r = namespace_flag_to_string_many(c->restrict_namespaces, &s); + r = namespace_flags_to_string(c->restrict_namespaces, &s); if (r >= 0) fprintf(f, "%sRestrictNamespaces: %s\n", prefix, s); |