Refactor daemon connection

This commit is contained in:
LoveSy
2022-02-12 23:43:36 +08:00
committed by John Wu
parent c82a46c1ee
commit 7999b66c3c
14 changed files with 312 additions and 237 deletions

View File

@@ -159,10 +159,7 @@ int su_client_main(int argc, char *argv[]) {
int ptmx, fd;
// Connect to client
fd = connect_daemon();
// Tell the daemon we are su
write_int(fd, SUPERUSER);
fd = connect_daemon(DaemonRequest::SUPERUSER);
// Send su_request
xwrite(fd, &su_req, sizeof(su_req_base));