apparmor: switch IsLoaded to return bool

Signed-off-by: Aleksa Sarai <asarai@suse.de>
This commit is contained in:
Aleksa Sarai
2016-12-06 00:10:08 +11:00
parent f7862482ce
commit e440a57a79
2 changed files with 12 additions and 6 deletions

View File

@@ -21,7 +21,7 @@ func installDefaultAppArmorProfile() {
// Allow daemon to run if loading failed, but are active
// (possibly through another run, manually, or via system startup)
for _, policy := range apparmorProfiles {
if err := aaprofile.IsLoaded(policy); err != nil {
if loaded, err := aaprofile.IsLoaded(policy); err != nil || !loaded {
logrus.Errorf("AppArmor enabled on system but the %s profile could not be loaded.", policy)
}
}