Commit 16527cea authored by topjohnwu's avatar topjohnwu

Use util function

parent f799db67
...@@ -104,9 +104,7 @@ void su_daemon_receiver(int client) { ...@@ -104,9 +104,7 @@ void su_daemon_receiver(int client) {
// Check the credentials // Check the credentials
struct ucred credentials; struct ucred credentials;
socklen_t ucred_length = sizeof(struct ucred); get_client_cred(client, &credentials);
if(getsockopt(client, SOL_SOCKET, SO_PEERCRED, &credentials, &ucred_length))
PLOGE("getsockopt");
from_uid = credentials.uid; from_uid = credentials.uid;
from_pid = credentials.pid; from_pid = credentials.pid;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment