selinux_linux.go 236 B

123456789101112
  1. package selinux
  2. // #cgo pkg-config: libselinux libsepol
  3. // #include <selinux/selinux.h>
  4. import "C"
  5. func InitializeSelinux() (int, error) {
  6. enforce := C.int(0)
  7. ret, err := C.selinux_init_load_policy(&enforce)
  8. return int(ret), err
  9. }