mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-18 08:58:15 +01:00
build: simplify full system policy generation.
This commit is contained in:
parent
cd1de59aad
commit
4b61abf7ce
1 changed files with 2 additions and 9 deletions
|
@ -180,15 +180,8 @@ func SetDefaultSystemd() error {
|
||||||
// See https://apparmor.pujol.io/development/structure/#full-system-policy
|
// See https://apparmor.pujol.io/development/structure/#full-system-policy
|
||||||
func SetFullSystemPolicy() error {
|
func SetFullSystemPolicy() error {
|
||||||
// Install full system policy profiles
|
// Install full system policy profiles
|
||||||
profiles := []string{
|
if err := copyTo(paths.New("apparmor.d/groups/_full/"), Root.Join("apparmor.d")); err != nil {
|
||||||
"systemd", "systemd-user",
|
return err
|
||||||
"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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set systemd profile name
|
// Set systemd profile name
|
||||||
|
|
Loading…
Reference in a new issue