ksud: refine su and make it compitable with MagiskSU
Supported features: 1. --mount-master, -M, -mm which would make the command run in global mount namespace. 2. - user to switch a specific user's shell. 3. -v, -V to print version code and name. fix #330 #306 #305 #32
This commit is contained in:
@@ -141,7 +141,7 @@ pub fn run() -> Result<()> {
|
||||
// the kernel executes su with argv[0] = "su" and replace it with us
|
||||
let arg0 = std::env::args().next().unwrap_or_default();
|
||||
if arg0 == "su" || arg0 == "/system/bin/su" {
|
||||
return crate::ksu::grant_root();
|
||||
return crate::ksu::root_shell();
|
||||
}
|
||||
|
||||
let cli = Args::parse();
|
||||
|
||||
Reference in New Issue
Block a user