core/dbus-execute: do not append denied syscalls in allow-list
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 15 Jun 2022 16:13:58 +0000 (01:13 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 17 Jun 2022 03:19:39 +0000 (12:19 +0900)
commit8c93ebbdf0e2fd0bc13e26b61581cdecbd805f41
treea151a1a6793e35ce75bb88bc58412f03ed9e88a6
parent172cbcdc8b61feffa07b332a871ec33b3215ad59
core/dbus-execute: do not append denied syscalls in allow-list

Follow-up for 68acc1afbe5cec50da1ffdc411dadda504e4caf5.

Before the commit, SystemCallFilter bus property provides only allowed
syscalls if ExecContext.syscall_filter is an allow-list, and vice versa.

After the commit, if the list is allow-list, it contains allowed
syscalls with value `-1`, and denied syscalls with non-negative values.

To keep the backward compatibility, denied syscalls must be dropped in
SystemCallFilter bus property.
src/core/dbus-execute.c