add selinux tip
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
2408758360
commit
f531cd23ee
43 changed files with 216 additions and 62 deletions
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue