feat(aa-log): update order of impression.

This commit is contained in:
Alexandre Pujol 2024-02-29 23:37:50 +00:00
parent 65386321c2
commit 86898ec673
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC
2 changed files with 2 additions and 2 deletions

View File

@ -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{

View File

@ -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 {