2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 22:35:35 +00:00

utils: fix dbus access string formatting

The AppArmorBug exception was missing the variable from the message

Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
This commit is contained in:
Georgia Garcia
2022-12-16 10:29:31 -03:00
parent 7618d69eca
commit e94cd809e4

View File

@@ -1696,7 +1696,7 @@ def collapse_log(hashlog, ignore_null_profiles=True):
elif access == 'eavesdrop': elif access == 'eavesdrop':
dbus_event = DbusRule(access, bus, DbusRule.ALL, DbusRule.ALL, DbusRule.ALL, DbusRule.ALL, DbusRule.ALL, DbusRule.ALL, log_event=True) dbus_event = DbusRule(access, bus, DbusRule.ALL, DbusRule.ALL, DbusRule.ALL, DbusRule.ALL, DbusRule.ALL, DbusRule.ALL, log_event=True)
else: else:
raise AppArmorBug('unexpected dbus access: %s') raise AppArmorBug('unexpected dbus access: {}'.format(access))
if not hat_exists or not is_known_rule(aa[profile][hat], 'dbus', dbus_event): if not hat_exists or not is_known_rule(aa[profile][hat], 'dbus', dbus_event):
log_dict[aamode][full_profile]['dbus'].add(dbus_event) log_dict[aamode][full_profile]['dbus'].add(dbus_event)