Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
db20f65d
Commit
db20f65d
authored
Sep 18, 2021
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
On denylist != do unmount
parent
63cfe7b4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
hook.cpp
native/jni/zygisk/hook.cpp
+3
-2
No files found.
native/jni/zygisk/hook.cpp
View file @
db20f65d
...
@@ -140,7 +140,7 @@ DCL_HOOK_FUNC(int, fork) {
...
@@ -140,7 +140,7 @@ DCL_HOOK_FUNC(int, fork) {
// This is the latest point where we can still connect to the magiskd main socket
// This is the latest point where we can still connect to the magiskd main socket
DCL_HOOK_FUNC
(
int
,
selinux_android_setcontext
,
DCL_HOOK_FUNC
(
int
,
selinux_android_setcontext
,
uid_t
uid
,
int
isSystemServer
,
const
char
*
seinfo
,
const
char
*
pkgname
)
{
uid_t
uid
,
int
isSystemServer
,
const
char
*
seinfo
,
const
char
*
pkgname
)
{
if
(
g_ctx
&&
g_ctx
->
info
.
on_denylist
)
{
if
(
g_ctx
&&
g_ctx
->
flags
[
DENY_FLAG
]
)
{
if
(
remote_request_unmount
()
==
0
)
{
if
(
remote_request_unmount
()
==
0
)
{
LOGD
(
"zygisk: mount namespace cleaned up
\n
"
);
LOGD
(
"zygisk: mount namespace cleaned up
\n
"
);
}
}
...
@@ -247,6 +247,7 @@ void HookContext::nativeSpecializeAppProcess_pre() {
...
@@ -247,6 +247,7 @@ void HookContext::nativeSpecializeAppProcess_pre() {
/* TODO: Handle MOUNT_EXTERNAL_NONE */
/* TODO: Handle MOUNT_EXTERNAL_NONE */
if
(
args
->
mount_external
!=
0
&&
info
.
on_denylist
)
{
if
(
args
->
mount_external
!=
0
&&
info
.
on_denylist
)
{
LOGI
(
"zygisk: [%s] is on the denylist
\n
"
,
process
);
LOGI
(
"zygisk: [%s] is on the denylist
\n
"
,
process
);
flags
[
DENY_FLAG
]
=
true
;
}
else
{
}
else
{
run_modules_pre
();
run_modules_pre
();
}
}
...
@@ -260,7 +261,7 @@ void HookContext::nativeSpecializeAppProcess_post() {
...
@@ -260,7 +261,7 @@ void HookContext::nativeSpecializeAppProcess_post() {
}
}
env
->
ReleaseStringUTFChars
(
args
->
nice_name
,
process
);
env
->
ReleaseStringUTFChars
(
args
->
nice_name
,
process
);
if
(
info
.
on_denylist
)
{
if
(
flags
[
DENY_FLAG
]
)
{
self_unload
();
self_unload
();
}
else
{
}
else
{
run_modules_post
();
run_modules_post
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment