build: use the base-strict abstraction automatically.

This commit is contained in:
Alexandre Pujol 2025-06-16 23:17:45 +02:00
parent 7dd860f277
commit 1118d2ffc5
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
2 changed files with 7 additions and 3 deletions

View file

@ -8,14 +8,14 @@
abi <abi/4.0>,
include <abstractions/base>
include <abstractions/base-strict>
@{att}/@{run}/systemd/journal/dev-log w,
@{att}/@{run}/systemd/journal/socket w,
@{att}/@{run}/systemd/journal/stdout rw,
deny /apparmor/.null rw,
deny @{att}/apparmor/.null rw,
/apparmor/.null rw,
@{att}/apparmor/.null rw,
include if exists <abstractions/attached/base.d>

View file

@ -49,6 +49,10 @@ func (b ReAttach) Apply(opt *Option, profile string) (string, error) {
} else {
insert = "@{att} = /\n"
profile = strings.ReplaceAll(profile,
"include <abstractions/base>",
"include <abstractions/base-strict>",
)
}
return strings.Replace(profile, origin, insert+origin, 1), nil