mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 22:05:27 +00:00
parser: Check for kernel support prior to processing dbus entries
When a parser that is aware of dbus rules is running under a kernel that is unaware of dbus rules, the parser should ignore the dbus rules instead of attempting to load them into the kernel. Otherwise, the kernel will reject the entire profile, leaving the application unconfined. Similar to what is done for mount rules, the features listed in apparmorfs should be checked to see if dbus is supported under the current kernel. Signed-off-by: Tyler Hicks <tyhicks@canonical.com> Acked-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
@@ -757,6 +757,8 @@ static void get_match_string(void) {
|
||||
kernel_supports_network = 0;
|
||||
if (strstr(flags_string, "mount"))
|
||||
kernel_supports_mount = 1;
|
||||
if (strstr(flags_string, "dbus"))
|
||||
kernel_supports_dbus = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user