compositor: Drop setuid when launching clients
This commit is contained in:
@@ -96,6 +96,9 @@ child_client_exec(int sockfd, const char *path)
|
|||||||
sigfillset(&allsigs);
|
sigfillset(&allsigs);
|
||||||
sigprocmask(SIG_UNBLOCK, &allsigs, NULL);
|
sigprocmask(SIG_UNBLOCK, &allsigs, NULL);
|
||||||
|
|
||||||
|
/* Launch clients as the user. */
|
||||||
|
seteuid(getuid());
|
||||||
|
|
||||||
/* SOCK_CLOEXEC closes both ends, so we dup the fd to get a
|
/* SOCK_CLOEXEC closes both ends, so we dup the fd to get a
|
||||||
* non-CLOEXEC fd to pass through exec. */
|
* non-CLOEXEC fd to pass through exec. */
|
||||||
clientfd = dup(sockfd);
|
clientfd = dup(sockfd);
|
||||||
|
|||||||
Reference in New Issue
Block a user