ksud: ensure ksud context when install (#356)

Incorrect se context will make module system broken
This commit is contained in:
Ylarod
2023-04-07 12:46:59 +08:00
committed by GitHub
parent 4d6fafd778
commit ffe3e68c35
2 changed files with 4 additions and 4 deletions

View File

@@ -7,8 +7,8 @@ use anyhow::{Context, Ok};
#[cfg(any(target_os = "linux", target_os = "android"))]
use extattr::{setxattr, Flags as XattrFlags};
const SYSTEM_CON: &str = "u:object_r:system_file:s0";
const _ADB_CON: &str = "u:object_r:adb_data_file:s0";
pub const SYSTEM_CON: &str = "u:object_r:system_file:s0";
pub const ADB_CON: &str = "u:object_r:adb_data_file:s0";
const SELINUX_XATTR: &str = "security.selinux";
pub fn setcon<P: AsRef<Path>>(path: P, con: &str) -> Result<()> {