fix(aa-log): too much cleaning in pci path.

see #505
This commit is contained in:
Alexandre Pujol 2024-10-02 20:48:36 +01:00
parent 7ba556b15c
commit 3f98e86e24
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
3 changed files with 22 additions and 1 deletions

View file

@ -247,6 +247,26 @@ func TestNew(t *testing.T) {
path: filepath.Join(testdata, "audit.log"),
want: refPowerProfiles,
},
{
name: "signal-desktop",
path: filepath.Join(testdata, "audit.log"),
want: AppArmorLogs{
{
"apparmor": "ALLOWED",
"profile": "signal-desktop",
"operation": "open",
"class": "file",
"name": "@{sys}/devices/@{pci}/boot_vga",
"comm": "signal-desktop",
"requested_mask": "r",
"denied_mask": "r",
"fsuid": "1000",
"ouid": "0",
"FSUID": "user",
"OUID": "root",
},
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {