Updating error condition in applying apparmor profile
Signed-off-by: rajasec <rajasec79@gmail.com>
This commit is contained in:
parent
89c3c97a84
commit
cb04f48486
|
@ -7,6 +7,7 @@ package apparmor
|
|||
// #include <stdlib.h>
|
||||
import "C"
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"unsafe"
|
||||
|
@ -32,7 +33,7 @@ func ApplyProfile(name string) error {
|
|||
cName := C.CString(name)
|
||||
defer C.free(unsafe.Pointer(cName))
|
||||
if _, err := C.aa_change_onexec(cName); err != nil {
|
||||
return err
|
||||
return fmt.Errorf("apparmor failed to apply profile: %s", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue