Harden socket verification

- Do not allow connections to magiskd from binaries other than the one started the server
- Do not allow connections to magisklogd without root access
This commit is contained in:
topjohnwu
2019-02-09 15:02:46 -05:00
parent 9826640ae6
commit b3242322fd
4 changed files with 34 additions and 8 deletions

View File

@ -48,6 +48,7 @@ bool start_log_daemon();
socklen_t setup_sockaddr(struct sockaddr_un *sun, const char *name);
int create_rand_socket(struct sockaddr_un *sun);
int socket_accept(int sockfd, int timeout);
void get_client_cred(int fd, struct ucred *cred);
int recv_fd(int sockfd);
void send_fd(int sockfd, int fd);
int read_int(int fd);