Skip to content
/ incus Public
forked from lxc/incus

Commit

Permalink
incusd/apparmor: Don't attempt unloading profiles when apparmor is di…
Browse files Browse the repository at this point in the history
…sabled

Closes lxc#1205

Signed-off-by: Stéphane Graber <[email protected]>
  • Loading branch information
stgraber committed Sep 9, 2024
1 parent 40ba91f commit 4688c5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/server/apparmor/apparmor.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func unloadProfile(sysOS *sys.OS, fullName string, name string) error {

// deleteProfile unloads and delete profile and cache for a profile.
func deleteProfile(sysOS *sys.OS, fullName string, name string) error {
if !sysOS.AppArmorAdmin {
if !sysOS.AppArmorAvailable || !sysOS.AppArmorAdmin {
return nil
}

Expand Down

0 comments on commit 4688c5e

Please sign in to comment.