mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-03 07:51:54 +00:00
Add daemon response code
This commit is contained in:
@@ -386,3 +386,9 @@ void clone_attr(const char *source, const char *target) {
|
||||
lsetfilecon(target, con);
|
||||
free(con);
|
||||
}
|
||||
|
||||
void get_client_cred(int fd, struct ucred *cred) {
|
||||
socklen_t ucred_length = sizeof(*cred);
|
||||
if(getsockopt(fd, SOL_SOCKET, SO_PEERCRED, cred, &ucred_length))
|
||||
PLOGE("getsockopt");
|
||||
}
|
||||
|
||||
@@ -89,5 +89,6 @@ int cp_afc(const char *source, const char *target);
|
||||
int clone_dir(const char *source, const char *target);
|
||||
int rm_rf(const char *target);
|
||||
void clone_attr(const char *source, const char *target);
|
||||
void get_client_cred(int fd, struct ucred *cred);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user