Skip to content

Commit ec77200

Browse files
author
Mrunal Patel
committed
Merge pull request #804 from rajasec/apparmor-error
Updating error condition in applying apparmor profile
2 parents 03ef0a2 + cb04f48 commit ec77200

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)