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
c8990b0f
Commit
c8990b0f
authored
Feb 07, 2022
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rewrite UID tracking
parent
7dced4b9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
140 additions
and
99 deletions
+140
-99
xwrap.cpp
native/jni/utils/xwrap.cpp
+8
-0
xwrap.hpp
native/jni/utils/xwrap.hpp
+4
-3
utils.cpp
native/jni/zygisk/deny/utils.cpp
+128
-96
No files found.
native/jni/utils/xwrap.cpp
View file @
c8990b0f
...
@@ -288,6 +288,14 @@ int xfstat(int fd, struct stat *buf) {
...
@@ -288,6 +288,14 @@ int xfstat(int fd, struct stat *buf) {
return
ret
;
return
ret
;
}
}
int
xfstatat
(
int
dirfd
,
const
char
*
pathname
,
struct
stat
*
buf
,
int
flags
)
{
int
ret
=
fstatat
(
dirfd
,
pathname
,
buf
,
flags
);
if
(
ret
<
0
)
{
PLOGE
(
"fstatat %s"
,
pathname
);
}
return
ret
;
}
int
xdup
(
int
fd
)
{
int
xdup
(
int
fd
)
{
int
ret
=
dup
(
fd
);
int
ret
=
dup
(
fd
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
...
...
native/jni/utils/xwrap.hpp
View file @
c8990b0f
...
@@ -26,9 +26,9 @@ int xbind(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
...
@@ -26,9 +26,9 @@ int xbind(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
int
xconnect
(
int
sockfd
,
const
struct
sockaddr
*
addr
,
socklen_t
addrlen
);
int
xconnect
(
int
sockfd
,
const
struct
sockaddr
*
addr
,
socklen_t
addrlen
);
int
xlisten
(
int
sockfd
,
int
backlog
);
int
xlisten
(
int
sockfd
,
int
backlog
);
int
xaccept4
(
int
sockfd
,
struct
sockaddr
*
addr
,
socklen_t
*
addrlen
,
int
flags
);
int
xaccept4
(
int
sockfd
,
struct
sockaddr
*
addr
,
socklen_t
*
addrlen
,
int
flags
);
extern
"C"
void
*
xmalloc
(
size_t
size
);
void
*
xmalloc
(
size_t
size
);
extern
"C"
void
*
xcalloc
(
size_t
nmemb
,
size_t
size
);
void
*
xcalloc
(
size_t
nmemb
,
size_t
size
);
extern
"C"
void
*
xrealloc
(
void
*
ptr
,
size_t
size
);
void
*
xrealloc
(
void
*
ptr
,
size_t
size
);
ssize_t
xsendmsg
(
int
sockfd
,
const
struct
msghdr
*
msg
,
int
flags
);
ssize_t
xsendmsg
(
int
sockfd
,
const
struct
msghdr
*
msg
,
int
flags
);
ssize_t
xrecvmsg
(
int
sockfd
,
struct
msghdr
*
msg
,
int
flags
);
ssize_t
xrecvmsg
(
int
sockfd
,
struct
msghdr
*
msg
,
int
flags
);
int
xpthread_create
(
pthread_t
*
thread
,
const
pthread_attr_t
*
attr
,
int
xpthread_create
(
pthread_t
*
thread
,
const
pthread_attr_t
*
attr
,
...
@@ -37,6 +37,7 @@ int xaccess(const char *path, int mode);
...
@@ -37,6 +37,7 @@ int xaccess(const char *path, int mode);
int
xstat
(
const
char
*
pathname
,
struct
stat
*
buf
);
int
xstat
(
const
char
*
pathname
,
struct
stat
*
buf
);
int
xlstat
(
const
char
*
pathname
,
struct
stat
*
buf
);
int
xlstat
(
const
char
*
pathname
,
struct
stat
*
buf
);
int
xfstat
(
int
fd
,
struct
stat
*
buf
);
int
xfstat
(
int
fd
,
struct
stat
*
buf
);
int
xfstatat
(
int
dirfd
,
const
char
*
pathname
,
struct
stat
*
buf
,
int
flags
);
int
xdup
(
int
fd
);
int
xdup
(
int
fd
);
int
xdup2
(
int
oldfd
,
int
newfd
);
int
xdup2
(
int
oldfd
,
int
newfd
);
int
xdup3
(
int
oldfd
,
int
newfd
,
int
flags
);
int
xdup3
(
int
oldfd
,
int
newfd
,
int
flags
);
...
...
native/jni/zygisk/deny/utils.cpp
View file @
c8990b0f
This diff is collapsed.
Click to expand it.
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