mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-28 12:35:26 +00:00
Use util function
This commit is contained in:
parent
f799db67eb
commit
16527ceaf6
@ -104,9 +104,7 @@ void su_daemon_receiver(int client) {
|
||||
|
||||
// Check the credentials
|
||||
struct ucred credentials;
|
||||
socklen_t ucred_length = sizeof(struct ucred);
|
||||
if(getsockopt(client, SOL_SOCKET, SO_PEERCRED, &credentials, &ucred_length))
|
||||
PLOGE("getsockopt");
|
||||
get_client_cred(client, &credentials);
|
||||
|
||||
from_uid = credentials.uid;
|
||||
from_pid = credentials.pid;
|
||||
|
Loading…
Reference in New Issue
Block a user