Skip to content

Commit

Permalink
No inline for root_impl
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr-TSNG committed Mar 21, 2023
1 parent 87cf885 commit a6f4552
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
4 changes: 2 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ pluginManagement {
gradlePluginPortal()
}
plugins {
id("com.android.library") version "7.4.1"
id("com.android.application") version "7.4.1"
id("com.android.library") version "7.4.2"
id("com.android.application") version "7.4.2"
}
}

Expand Down
2 changes: 2 additions & 0 deletions zygiskd/src/root_impl/kernelsu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pub fn get_kernel_su() -> Option<Version> {
}
}

#[inline(never)]
pub fn uid_on_allowlist(uid: i32) -> bool {
let mut size = 1024u32;
let mut uids = vec![0; size as usize];
Expand All @@ -32,6 +33,7 @@ pub fn uid_on_allowlist(uid: i32) -> bool {
uids.contains(&uid)
}

#[inline(never)]
pub fn uid_on_denylist(uid: i32) -> bool {
let mut size = 1024u32;
let mut uids = vec![0; size as usize];
Expand Down
2 changes: 2 additions & 0 deletions zygiskd/src/root_impl/magisk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ pub fn get_magisk() -> Option<Version> {
})
}

#[inline(never)]
pub fn uid_on_allowlist(uid: i32) -> bool {
let output: Option<String> = Command::new("magisk")
.arg("--sqlite")
Expand All @@ -40,6 +41,7 @@ pub fn uid_on_allowlist(uid: i32) -> bool {
})
}

#[inline(never)]
pub fn uid_on_denylist(uid: i32) -> bool {
// TODO: uid_on_denylist
return false;
Expand Down
2 changes: 1 addition & 1 deletion zygiskd/src/zygiskd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ fn handle_daemon_action(mut stream: UnixStream, context: &Context) -> Result<()>
match root_impl::get_impl() {
root_impl::RootImpl::KernelSU => flags |= constants::PROCESS_ROOT_IS_KSU,
root_impl::RootImpl::Magisk => flags |= constants::PROCESS_ROOT_IS_MAGISK,
_ => ()
_ => unreachable!(),
}
// TODO: PROCESS_IS_SYSUI?
stream.write_u32(flags)?;
Expand Down

0 comments on commit a6f4552

Please sign in to comment.