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
b591af78
Commit
b591af78
authored
Aug 22, 2021
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor bug fixes
parent
171d68ca
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
daemon.cpp
native/jni/core/daemon.cpp
+1
-1
entry.cpp
native/jni/zygisk/entry.cpp
+5
-5
No files found.
native/jni/core/daemon.cpp
View file @
b591af78
...
@@ -264,7 +264,7 @@ int connect_daemon(bool create) {
...
@@ -264,7 +264,7 @@ int connect_daemon(bool create) {
if
(
connect
(
fd
,
(
sockaddr
*
)
&
sun
,
len
))
{
if
(
connect
(
fd
,
(
sockaddr
*
)
&
sun
,
len
))
{
if
(
!
create
||
getuid
()
!=
UID_ROOT
)
{
if
(
!
create
||
getuid
()
!=
UID_ROOT
)
{
LOGE
(
"No daemon is currently running!
\n
"
);
LOGE
(
"No daemon is currently running!
\n
"
);
return
1
;
return
-
1
;
}
}
if
(
fork_dont_care
()
==
0
)
{
if
(
fork_dont_care
()
==
0
)
{
...
...
native/jni/zygisk/entry.cpp
View file @
b591af78
...
@@ -236,11 +236,11 @@ int remote_request_unmount() {
...
@@ -236,11 +236,11 @@ int remote_request_unmount() {
// The following code runs in magiskd
// The following code runs in magiskd
static
void
setup_files
(
int
client
,
ucred
*
cred
)
{
static
void
setup_files
(
int
client
,
ucred
*
cred
)
{
LOGD
(
"zygisk: setup files
\n
"
);
LOGD
(
"zygisk: setup files
for pid=[%d]
\n
"
,
cred
->
pid
);
char
buf
[
PATH_MAX
];
char
buf
[
256
];
s
printf
(
buf
,
"/proc/%d/exe"
,
cred
->
pid
);
s
nprintf
(
buf
,
sizeof
(
buf
)
,
"/proc/%d/exe"
,
cred
->
pid
);
if
(
realpath
(
buf
,
buf
)
==
nullptr
)
{
if
(
xreadlink
(
buf
,
buf
,
sizeof
(
buf
))
<
0
)
{
write_int
(
client
,
1
);
write_int
(
client
,
1
);
return
;
return
;
}
}
...
@@ -276,7 +276,7 @@ static void do_unmount(int client, ucred *cred) {
...
@@ -276,7 +276,7 @@ static void do_unmount(int client, ucred *cred) {
static
void
send_log_pipe
(
int
fd
)
{
static
void
send_log_pipe
(
int
fd
)
{
// There is race condition here, but we can't really do much about it...
// There is race condition here, but we can't really do much about it...
if
(
logd_fd
)
{
if
(
logd_fd
>=
0
)
{
write_int
(
fd
,
0
);
write_int
(
fd
,
0
);
send_fd
(
fd
,
logd_fd
);
send_fd
(
fd
,
logd_fd
);
}
else
{
}
else
{
...
...
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