From ee3322c463ecc463346a86d72909eb4eabaef6c7 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Thu, 4 Jul 2024 22:25:09 +0100 Subject: [PATCH] feat(aa-log): full detection of pci path. --- pkg/logs/logs.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/logs/logs.go b/pkg/logs/logs.go index 9771bd82..c1bcf81d 100644 --- a/pkg/logs/logs.go +++ b/pkg/logs/logs.go @@ -49,7 +49,7 @@ var ( `(?m)^.*/dev/(u|)random.*$`, ``, }) regResolveLogs = util.ToRegexRepl([]string{ - // Resolve classic user variables + // Resolve user variables `/home/[^/]+/.cache`, `@{user_cache_dirs}`, `/home/[^/]+/.config`, `@{user_config_dirs}`, `/home/[^/]+/.local/share`, `@{user_share_dirs}`, @@ -60,7 +60,7 @@ var ( `/home/[^/]+/.gnupg`, `@{HOME}/@{XDG_GPG_DIR}`, `/home/[^/]+/`, `@{HOME}/`, - // Resolve classic system variables + // Resolve system variables `/usr/(lib|lib32|lib64|libexec)`, `@{lib}`, `/usr/(bin|sbin)`, `@{bin}`, `x86_64-pc-linux-gnu[^/]?`, `@{multiarch}`, @@ -75,7 +75,8 @@ var ( `/sys/`, `@{sys}/`, `@{PROC}@{sys}/`, `@{PROC}/sys/`, `pci` + strings.Repeat(_hex, 4) + `:` + strings.Repeat(_hex, 2), `@{pci_bus}`, - `1000`, `@{pid}`, + `@{pci_bus}/[0-9a-f:*./]*`, `@{pci}/`, + `1000`, `@{uid}`, // Some system glob `:1.[0-9]*`, `:*`, // dbus peer name