Skip to content

Commit 949d822

Browse files
committed
Adding error conditions when apparmor disabled
Signed-off-by: rajasec <[email protected]> Add the changes to errors in lower case Signed-off-by: rajasec <[email protected]>
1 parent 97bc9a7 commit 949d822

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)