Add easy knobs to disable security checks

This commit is contained in:
topjohnwu
2025-10-02 04:09:46 -07:00
parent ca2e40593f
commit 78e2fc37e5
3 changed files with 17 additions and 1 deletions
+6
View File
@@ -161,6 +161,7 @@ impl MagiskD {
.ok();
}
#[cfg(feature = "check-client")]
fn is_client(&self, pid: i32) -> bool {
let mut buf = cstr::buf::new::<32>();
write!(buf, "/proc/{pid}/exe").ok();
@@ -171,6 +172,11 @@ impl MagiskD {
}
}
#[cfg(not(feature = "check-client"))]
fn is_client(&self, pid: i32) -> bool {
true
}
fn handle_requests(&'static self, mut client: UnixStream) {
let Ok(cred) = client.peer_cred() else {
// Client died