Commit 840a421a authored by Alexandru DAMIAN's avatar Alexandru DAMIAN Committed by Kristian H. Kristensen

compositor: check if seteuid worked

Checking the return value from seteuid in
order to not launch clients with the wrong effective uid.
Signed-off-by: default avatarAlexandru DAMIAN <>
parent c3ea26c0
......@@ -247,8 +247,11 @@ child_client_exec(int sockfd, const char *path)
sigprocmask(SIG_UNBLOCK, &allsigs, NULL);
/* Launch clients as the user. */
/* Launch clients as the user. Do not lauch clients with wrong euid.*/
if (seteuid(getuid()) == -1) {
weston_log("compositor: failed seteuid\n");
/* SOCK_CLOEXEC closes both ends, so we dup the fd to get a
* non-CLOEXEC fd to pass through exec. */
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment