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
e33a5eb3
Commit
e33a5eb3
authored
Jul 13, 2017
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set proper selinux context for /sbin re-link
parent
e5b704eb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
hide_utils.c
jni/magiskhide/hide_utils.c
+7
-3
magiskpolicy
jni/magiskpolicy
+1
-1
No files found.
jni/magiskhide/hide_utils.c
View file @
e33a5eb3
...
...
@@ -78,10 +78,14 @@ void relink_sbin() {
dir
=
xopendir
(
"/sbin_orig"
);
while
((
entry
=
xreaddir
(
dir
)))
{
snprintf
(
from
,
sizeof
(
from
),
"%s/%s"
,
"/sbin_orig"
,
entry
->
d_name
);
snprintf
(
to
,
sizeof
(
to
),
"%s/%s"
,
"/dev/sbin_bind"
,
entry
->
d_name
);
if
(
strcmp
(
entry
->
d_name
,
".."
)
==
0
)
continue
;
snprintf
(
from
,
sizeof
(
from
),
"/sbin_orig/%s"
,
entry
->
d_name
);
if
(
entry
->
d_type
==
DT_LNK
)
xreadlink
(
from
,
from
,
sizeof
(
from
));
snprintf
(
to
,
sizeof
(
to
),
"/dev/sbin_bind/%s"
,
entry
->
d_name
);
symlink
(
from
,
to
);
lsetfilecon
(
to
,
"u:object_r:
system_file
:s0"
);
lsetfilecon
(
to
,
"u:object_r:
rootfs
:s0"
);
}
closedir
(
dir
);
...
...
magiskpolicy
@
c1c6f55f
Subproject commit
4c7e081e158b1d6a56a76b98f61d880f3d8a994d
Subproject commit
c1c6f55f8f51cd24b5f926059e32d4a70a422430
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