Skip to content

Commit 1d3c658

Browse files
author
Mrunal Patel
committed
Merge pull request #411 from rajasec/apparmor-changes
Adding error conditions when apparmor disabled
2 parents 97bc9a7 + 949d822 commit 1d3c658

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

libcontainer/apparmor/apparmor_disabled.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,19 @@
22

33
package apparmor
44

5+
import (
6+
"errors"
7+
)
8+
9+
var ErrApparmorNotEnabled = errors.New("apparmor: config provided but apparmor not supported")
10+
511
func IsEnabled() bool {
612
return false
713
}
814

915
func ApplyProfile(name string) error {
16+
if name != "" {
17+
return ErrApparmorNotEnabled
18+
}
1019
return nil
1120
}

0 commit comments

Comments
 (0)