Skip to content

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 authored and bketelsen committed Feb 4, 2025
1 parent f759c39 commit 2c84b3a
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 2c84b3a

Please sign in to comment.