summaryrefslogtreecommitdiffstats
path: root/src/core/dbus-execute.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-02-26 12:51:35 +0100
committerLennart Poettering <lennart@poettering.net>2018-02-27 19:59:09 +0100
commit13d92c6300edbb1369f97c2e1bef4c4096de8ddb (patch)
tree120ab6d5ae6ee4c73b97e78fe895803d3512936e /src/core/dbus-execute.c
parentsystemd-sysv-install: unset ROOT rather than setting it to "" (diff)
downloadsystemd-13d92c6300edbb1369f97c2e1bef4c4096de8ddb.tar.xz
systemd-13d92c6300edbb1369f97c2e1bef4c4096de8ddb.zip
seccomp: rework functions for parsing system call filters
This reworks system call filter parsing, and replaces a couple of "bool" function arguments by a single flags parameter. This shouldn't change behaviour, except for one case: when we recursively call our parsing function on our own syscall list, then we'll lower the log level to LOG_DEBUG from LOG_WARNING, because at that point things are just a problem in our own code rather than in the user configuration we are parsing, and we shouldn't hence generate confusing warnings about syntax errors. Fixes: #8261
Diffstat (limited to 'src/core/dbus-execute.c')
-rw-r--r--src/core/dbus-execute.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c
index 7ab40ca6ba..635213a866 100644
--- a/src/core/dbus-execute.c
+++ b/src/core/dbus-execute.c
@@ -1602,7 +1602,7 @@ int bus_exec_context_set_transient_property(
c->syscall_whitelist = whitelist;
if (c->syscall_whitelist) {
- r = seccomp_parse_syscall_filter(invert, "@default", -1, c->syscall_filter, true);
+ r = seccomp_parse_syscall_filter("@default", -1, c->syscall_filter, SECCOMP_PARSE_WHITELIST | (invert ? SECCOMP_PARSE_INVERT : 0));
if (r < 0)
return r;
}
@@ -1616,7 +1616,7 @@ int bus_exec_context_set_transient_property(
if (r < 0)
return r;
- r = seccomp_parse_syscall_filter(invert, n, e, c->syscall_filter, c->syscall_whitelist);
+ r = seccomp_parse_syscall_filter(n, e, c->syscall_filter, (invert ? SECCOMP_PARSE_INVERT : 0) | (c->syscall_whitelist ? SECCOMP_PARSE_WHITELIST : 0));
if (r < 0)
return r;
}