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
d0567d29
Commit
d0567d29
authored
Dec 18, 2017
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update su to match Linux's implementation
parent
4db0ad32
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
daemon.c
core/jni/core/daemon.c
+4
-4
daemon.h
core/jni/include/daemon.h
+2
-1
su
core/jni/su
+1
-1
No files found.
core/jni/core/daemon.c
View file @
d0567d29
...
...
@@ -27,8 +27,8 @@ static void *request_handler(void *args) {
free
(
args
);
client_request
req
=
read_int
(
client
);
struct
ucred
credential
s
;
get_client_cred
(
client
,
&
credential
s
);
struct
ucred
credential
;
get_client_cred
(
client
,
&
credential
);
switch
(
req
)
{
case
LAUNCH_MAGISKHIDE
:
...
...
@@ -39,7 +39,7 @@ static void *request_handler(void *args) {
case
POST_FS
:
case
POST_FS_DATA
:
case
LATE_START
:
if
(
credential
s
.
uid
!=
0
)
{
if
(
credential
.
uid
!=
0
)
{
write_int
(
client
,
ROOT_REQUIRED
);
close
(
client
);
return
NULL
;
...
...
@@ -65,7 +65,7 @@ static void *request_handler(void *args) {
ls_hide_list
(
client
);
break
;
case
SUPERUSER
:
su_daemon_receiver
(
client
);
su_daemon_receiver
(
client
,
&
credential
);
break
;
case
CHECK_VERSION
:
write_string
(
client
,
MAGISK_VER_STR
);
...
...
core/jni/include/daemon.h
View file @
d0567d29
...
...
@@ -6,6 +6,7 @@
#include <pthread.h>
#include <sys/un.h>
#include <sys/socket.h>
extern
int
is_daemon_init
,
seperate_vendor
;
...
...
@@ -77,6 +78,6 @@ void ls_hide_list(int client);
* Superuser *
*************/
void
su_daemon_receiver
(
int
client
);
void
su_daemon_receiver
(
int
client
,
struct
ucred
*
credential
);
#endif
su
@
d946e4cf
Subproject commit
8b15e42253091a28c33a5e5e827d7750576d54dd
Subproject commit
d946e4cf8667e79327b06ca24bbaeae600681c5e
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