mirror of
https://github.com/topjohnwu/Magisk.git
synced 2026-08-01 16:37:56 -07:00
Move more daemon_start code into Rust
This commit is contained in:
@@ -20,11 +20,8 @@
|
||||
#define BBPATH INTLROOT "/busybox"
|
||||
#define ROOTOVL INTLROOT "/rootdir"
|
||||
#define SHELLPTS INTLROOT "/pts"
|
||||
#define ROOTMNT ROOTOVL "/.mount_list"
|
||||
#define SELINUXMOCK INTLROOT "/selinux"
|
||||
#define MAIN_CONFIG INTLROOT "/config"
|
||||
#define MAIN_SOCKET DEVICEDIR "/socket"
|
||||
#define LOG_PIPE DEVICEDIR "/log"
|
||||
|
||||
constexpr const char *applet_names[] = { "su", "resetprop", nullptr };
|
||||
|
||||
@@ -39,7 +36,6 @@ constexpr const char *applet_names[] = { "su", "resetprop", nullptr };
|
||||
#define MAGISK_FILE_CON "u:object_r:" SEPOL_FILE_TYPE ":s0"
|
||||
// Log pipe that only root and zygote can open
|
||||
#define SEPOL_LOG_TYPE "magisk_log_file"
|
||||
#define MAGISK_LOG_CON "u:object_r:" SEPOL_LOG_TYPE ":s0"
|
||||
|
||||
extern int SDK_INT;
|
||||
#define APP_DATA_DIR (SDK_INT >= 24 ? "/data/user_de" : "/data/user")
|
||||
|
||||
@@ -32,6 +32,7 @@ pub const SELINUXMOCK: &str = concatcp!(INTERNAL_DIR, "/selinux");
|
||||
|
||||
// Unconstrained domain the daemon and root processes run in
|
||||
pub const SEPOL_PROC_DOMAIN: &str = "magisk";
|
||||
pub const MAGISK_PROC_CON: &str = concatcp!("u:r:", SEPOL_PROC_DOMAIN, ":s0");
|
||||
// Unconstrained file type that anyone can access
|
||||
pub const SEPOL_FILE_TYPE: &str = "magisk_file";
|
||||
// Log pipe that only root and zygote can open
|
||||
|
||||
Reference in New Issue
Block a user