commit | a609434b95fb5aaee9da24d2e98be7eea741b040 | [log] [tgz] |
---|---|---|
author | Stephen Smalley <sds@tycho.nsa.gov> | Fri Nov 18 09:48:25 2016 -0500 |
committer | Stephen Smalley <sds@tycho.nsa.gov> | Fri Nov 18 09:48:25 2016 -0500 |
tree | ec9243e5b61c1fa3ded701acd7e76002224984b3 | |
parent | 9140de74cf3f156c7aa4e7e65882288bf3e388df [diff] |
libselinux: normalize enforce values from the kernel Normalize enforce values received from the kernel via /sys/fs/selinux/enforce or netlink selinux notifications to ensure that we always return a 0 or 1 to userspace code. selinux_status_getenforce(), which reads the enforce value via the SELinux kernel status page (/sys/fs/selinux/status) already normalizes its result, so we do not need to update it. Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>