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
f109038d
Commit
f109038d
authored
Sep 13, 2019
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hardcode shell uid to 2000
parent
e31e6876
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
10 deletions
+1
-10
misc.cpp
native/jni/utils/misc.cpp
+0
-8
misc.h
native/jni/utils/misc.h
+1
-2
No files found.
native/jni/utils/misc.cpp
View file @
f109038d
...
...
@@ -17,14 +17,6 @@
#include <logging.h>
#include <utils.h>
unsigned
get_shell_uid
()
{
struct
passwd
*
ppwd
=
getpwnam
(
"shell"
);
if
(
nullptr
==
ppwd
)
return
2000
;
return
ppwd
->
pw_uid
;
}
int
fork_dont_care
()
{
int
pid
=
xfork
();
if
(
pid
)
{
...
...
native/jni/utils/misc.h
View file @
f109038d
#pragma once
#define UID_SHELL (get_shell_uid())
#define UID_ROOT 0
#define UID_SHELL 2000
#ifdef __cplusplus
extern
"C"
{
#endif
unsigned
get_shell_uid
();
int
fork_dont_care
();
int
fork_no_zombie
();
int
strend
(
const
char
*
s1
,
const
char
*
s2
);
...
...
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