add selinux tip

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou committed 2023-10-21 23:24:54 +08:00
1 parent 2408758360
commit f531cd23ee
43 files changed
+216 -62

No files matched your search

+8
View File
@@ -1369,3 +1369,11 @@ impl Drop for WallPaperRemover {
pub fn is_x11() -> bool {
*IS_X11
}
#[inline]
pub fn is_selinux_enabled() -> bool {
match selinux::kernel_support() {
selinux::KernelSupport::Unsupported => false,
_ => selinux::current_mode() == selinux::SELinuxMode::Enforcing,
}
}