Skip to content

Commit cb04f48

Browse files
committed
Updating error condition in applying apparmor profile
Signed-off-by: rajasec <[email protected]>
1 parent 89c3c97 commit cb04f48

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libcontainer/apparmor/apparmor.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ package apparmor
77
// #include <stdlib.h>
88
import "C"
99
import (
10+
"fmt"
1011
"io/ioutil"
1112
"os"
1213
"unsafe"
@@ -32,7 +33,7 @@ func ApplyProfile(name string) error {
3233
cName := C.CString(name)
3334
defer C.free(unsafe.Pointer(cName))
3435
if _, err := C.aa_change_onexec(cName); err != nil {
35-
return err
36+
return fmt.Errorf("apparmor failed to apply profile: %s", err)
3637
}
3738
return nil
3839
}

0 commit comments

Comments
 (0)