feat(aa-log): add support for the sbin variable.

This commit is contained in:
Alexandre Pujol 2025-04-28 22:43:33 +02:00
parent 7b55b351ef
commit 1c499183f2
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
2 changed files with 3 additions and 2 deletions

View file

@ -67,7 +67,8 @@ var (
`/att/[^/@]+`, `@{att}/`,
`/usr/lib(32|64|exec)`, `@{lib}`,
`/usr/lib`, `@{lib}`,
`/usr/(bin|sbin)`, `@{bin}`,
`/usr/sbin`, `@{sbin}`,
`/usr/bin`, `@{bin}`,
`(x86_64|amd64|i386|i686)`, `@{arch}`,
`@{arch}-*linux-gnu[^/]?`, `@{multiarch}`,
`/usr/etc/`, `@{etc_ro}/`,

View file

@ -81,7 +81,7 @@ func TestAppArmorEvents(t *testing.T) {
want: AppArmorLogs{
{
"apparmor": "ALLOWED",
"profile": "@{bin}/httpd2-prefork//vhost_foo",
"profile": "@{sbin}/httpd2-prefork//vhost_foo",
"operation": "rename_dest",
"name": "@{HOME}/foo.bar.in/httpdocs/apparmor/images/test/image 1.jpg",
"comm": "httpd2-prefork",