summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorDjalal Harouni <tixxdz@opendz.org>2016-11-15 20:45:27 +0100
committerGitHub <noreply@github.com>2016-11-15 20:45:27 +0100
commitafc402b76a4520997a7c831a943be75e3072b301 (patch)
tree0ebe0b88cb1c755e5cd49cb169b23f494b99a3a8 /src/shared
parent22f1f8f24cc845dbb953535e93d69f06aa69712f (diff)
parent73186d534b1d4a8c217cf102ffd837d8e61a7e42 (diff)
Merge pull request #4658 from endocode/djalal/sandbox-various-fixes-v1
core: improve the logic that implies no new privileges and documentation fixes
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/bus-util.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c
index 3b8768b9a7..e7b1b1cb20 100644
--- a/src/shared/bus-util.c
+++ b/src/shared/bus-util.c
@@ -43,6 +43,7 @@
#include "escape.h"
#include "fd-util.h"
#include "missing.h"
+#include "nsflags.h"
#include "parse-util.h"
#include "proc-cmdline.h"
#include "rlimit-util.h"
@@ -769,6 +770,23 @@ int bus_print_property(const char *name, sd_bus_message *property, bool value, b
char timespan[FORMAT_TIMESPAN_MAX];
print_property(name, "%s", format_timespan(timespan, sizeof(timespan), u, 0));
+ } else if (streq(name, "RestrictNamespaces")) {
+ _cleanup_free_ char *s = NULL;
+ const char *result = NULL;
+
+ if ((u & NAMESPACE_FLAGS_ALL) == 0)
+ result = "yes";
+ else if ((u & NAMESPACE_FLAGS_ALL) == NAMESPACE_FLAGS_ALL)
+ result = "no";
+ else {
+ r = namespace_flag_to_string_many(u, &s);
+ if (r < 0)
+ return r;
+
+ result = s;
+ }
+
+ print_property(name, "%s", result);
} else
print_property(name, "%"PRIu64, u);