build: simplify full system policy generation.

This commit is contained in:
Alexandre Pujol 2023-11-26 21:19:16 +00:00
parent cd1de59aad
commit 4b61abf7ce
Failed to generate hash of commit

View file

@ -180,15 +180,8 @@ func SetDefaultSystemd() error {
// See https://apparmor.pujol.io/development/structure/#full-system-policy
func SetFullSystemPolicy() error {
// Install full system policy profiles
profiles := []string{
"systemd", "systemd-user",
"default", "default-bwrap", "default-sudo", "default-app",
}
for _, name := range profiles {
err := paths.New("apparmor.d/groups/_full/" + name).CopyTo(RootApparmord.Join(name))
if err != nil {
return err
}
if err := copyTo(paths.New("apparmor.d/groups/_full/"), Root.Join("apparmor.d")); err != nil {
return err
}
// Set systemd profile name