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
d021bca6
Commit
d021bca6
authored
Feb 11, 2022
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent app_process from setting umask
Fix #5435
parent
55ed6109
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
applets.cpp
native/jni/core/applets.cpp
+7
-4
No files found.
native/jni/core/applets.cpp
View file @
d021bca6
...
...
@@ -21,20 +21,23 @@ static int call_applet(int argc, char *argv[]) {
return
(
*
applet_mains
[
i
])(
argc
,
argv
);
}
}
if
(
str_starts
(
base
,
"app_process"
))
{
return
app_process_main
(
argc
,
argv
);
}
fprintf
(
stderr
,
"%s: applet not found
\n
"
,
base
.
data
());
return
1
;
}
int
main
(
int
argc
,
char
*
argv
[])
{
umask
(
0
);
enable_selinux
();
cmdline_logging
();
init_argv0
(
argc
,
argv
);
string_view
base
=
basename
(
argv
[
0
]);
// app_process is actually not an applet
if
(
str_starts
(
base
,
"app_process"
))
{
return
app_process_main
(
argc
,
argv
);
}
umask
(
0
);
if
(
base
==
"magisk"
||
base
==
"magisk32"
||
base
==
"magisk64"
)
{
if
(
argc
>
1
&&
argv
[
1
][
0
]
!=
'-'
)
{
// Calling applet via magisk [applet] args
...
...
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