summaryrefslogtreecommitdiff
path: root/src/systemctl
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-02-13 00:24:00 +0100
committerLennart Poettering <lennart@poettering.net>2014-02-13 00:24:00 +0100
commit57183d117a1d6a96d71ce99d648beb0d2b36228d (patch)
tree4b0c5b62073bf4766bd825c5d7d6b75967d7be40 /src/systemctl
parent351a19b17d51ba0a5737f35d3c5deb8e7975fdee (diff)
core: add SystemCallArchitectures= unit setting to allow disabling of non-native
architecture support for system calls Also, turn system call filter bus properties into complex types instead of concatenated strings.
Diffstat (limited to 'src/systemctl')
-rw-r--r--src/systemctl/systemctl.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index eb2d3f14fe..edd4daaa24 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -3405,6 +3405,48 @@ static int print_property(const char *name, sd_bus_message *m, const char *conte
printf("%s=%s \"%s\"\n", name, strempty(a), strempty(b));
return 0;
+ } else if (streq_ptr(name, "SystemCallFilter")) {
+ _cleanup_strv_free_ char **l = NULL;
+ int whitelist;
+
+ r = sd_bus_message_enter_container(m, 'r', "bas");
+ if (r < 0)
+ return bus_log_parse_error(r);
+
+ r = sd_bus_message_read(m, "b", &whitelist);
+ if (r < 0)
+ return bus_log_parse_error(r);
+
+ r = sd_bus_message_read_strv(m, &l);
+ if (r < 0)
+ return bus_log_parse_error(r);
+
+ r = sd_bus_message_exit_container(m);
+ if (r < 0)
+ return bus_log_parse_error(r);
+
+ if (arg_all || whitelist || !strv_isempty(l)) {
+ bool first = true;
+ char **i;
+
+ fputs(name, stdout);
+ fputc('=', stdout);
+
+ if (!whitelist)
+ fputc('~', stdout);
+
+ STRV_FOREACH(i, l) {
+ if (first)
+ first = false;
+ else
+ fputc(' ', stdout);
+
+ fputs(*i, stdout);
+ }
+ fputc('\n', stdout);
+ }
+
+ return 0;
}
break;