From 86898ec673a32c6ebe51733d5340a2644bff006f Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Thu, 29 Feb 2024 23:37:50 +0000 Subject: [PATCH] feat(aa-log): update order of impression. --- pkg/logs/logs.go | 2 +- pkg/logs/logs_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/logs/logs.go b/pkg/logs/logs.go index 974137c1..7d488058 100644 --- a/pkg/logs/logs.go +++ b/pkg/logs/logs.go @@ -136,7 +136,7 @@ func (aaLogs AppArmorLogs) String() string { "mask", "bus", "path", "interface", "member", // dbus "info", "comm", "laddr", "lport", "faddr", "fport", "family", "sock_type", "protocol", - "requested_mask", "denied_mask", "signal", "peer", + "requested_mask", "denied_mask", "signal", "peer", "peer_label", } // Key to not print ignore := []string{ diff --git a/pkg/logs/logs_test.go b/pkg/logs/logs_test.go index a0fffc77..4bfd5d90 100644 --- a/pkg/logs/logs_test.go +++ b/pkg/logs/logs_test.go @@ -276,7 +276,7 @@ func TestAppArmorLogs_String(t *testing.T) { { name: "power-profiles-daemon", aaLogs: refPowerProfiles, - want: "\033[1;32mALLOWED\033[0m \033[34mpower-profiles-daemon\033[0m \033[33mdbus_method_call\033[0m \033[35morg.freedesktop.DBus\033[0m \033[1;31msend\033[0m \033[36mbus=system\033[0m path=\033[37m/org/freedesktop/DBus\033[0m interface=\033[37morg.freedesktop.DBus\033[0m member=\033[32mAddMatch\033[0m peer_label=dbus-daemon\n", + want: "\033[1;32mALLOWED\033[0m \033[34mpower-profiles-daemon\033[0m \033[33mdbus_method_call\033[0m \033[35morg.freedesktop.DBus\033[0m \033[1;31msend\033[0m \033[36mbus=system\033[0m path=\033[37m/org/freedesktop/DBus\033[0m interface=\033[37morg.freedesktop.DBus\033[0m member=\033[32mAddMatch\033[0m peer_label=dbus-daemon addr=?\n", }, } for _, tt := range tests {