mirror of
https://github.com/kvorschk/Magisk.git
synced 2026-12-06 15:30:46 -05:00
Add easy knobs to disable security checks
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user