You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Migrate selinux.cpp to selinux.rs
This commit is contained in:
@@ -15,16 +15,25 @@ pub const LOGFILE: &str = "/cache/magisk.log";
|
||||
// data paths
|
||||
pub const SECURE_DIR: &str = "/data/adb";
|
||||
pub const MODULEROOT: &str = concatcp!(SECURE_DIR, "/modules");
|
||||
pub const DATABIN: &str = concatcp!(SECURE_DIR, "/magisk");
|
||||
|
||||
// tmpfs paths
|
||||
const INTERNAL_DIR: &str = ".magisk";
|
||||
pub const LOG_PIPE: &str = concatcp!(INTERNAL_DIR, "/device/log");
|
||||
pub const MAIN_CONFIG: &str = concatcp!(INTERNAL_DIR, "/config");
|
||||
pub const PREINITMIRR: &str = concatcp!(INTERNAL_DIR, "/preinit");
|
||||
pub const MODULEMNT: &str = concatcp!(INTERNAL_DIR, "/modules");
|
||||
pub const WORKERDIR: &str = concatcp!(INTERNAL_DIR, "/worker");
|
||||
pub const DEVICEDIR: &str = concatcp!(INTERNAL_DIR, "/device");
|
||||
pub const PREINITDEV: &str = concatcp!(DEVICEDIR, "/preinit");
|
||||
pub const LOG_PIPE: &str = concatcp!(DEVICEDIR, "/log");
|
||||
pub const ROOTOVL: &str = concatcp!(INTERNAL_DIR, "/rootdir");
|
||||
pub const ROOTMNT: &str = concatcp!(ROOTOVL, "/.mount_list");
|
||||
pub const SELINUXMOCK: &str = concatcp!(INTERNAL_DIR, "/selinux");
|
||||
|
||||
// Unconstrained domain the daemon and root processes run in
|
||||
pub const SEPOL_PROC_DOMAIN: &str = "magisk";
|
||||
// Unconstrained file type that anyone can access
|
||||
pub const SEPOL_FILE_TYPE: &str = "magisk_file";
|
||||
// Log pipe that only root and zygote can open
|
||||
pub const SEPOL_LOG_TYPE: &str = "magisk_log_file";
|
||||
pub const MAGISK_LOG_CON: &str = concatcp!("u:object_r:", SEPOL_LOG_TYPE, ":s0");
|
||||
|
||||
Reference in New Issue
Block a user