commit | eb764841a55ba28966c152c9667a9c12eaa64ed6 | [log] [tgz] |
---|---|---|
author | Kristian Høgsberg <krh@bitplanet.net> | Tue Jan 31 22:17:25 2012 -0500 |
committer | Kristian Høgsberg <krh@bitplanet.net> | Tue Feb 07 09:52:40 2012 -0500 |
tree | 2cfb82ab9359876f3cce708a5ccae1f24d4e6cb0 | |
parent | 0452abc8203e2c037f074c059b9952b9410ccbdd [diff] [blame] |
compositor: Drop setuid when launching clients
diff --git a/src/compositor.c b/src/compositor.c index 1fe90cd..0cf01f2 100644 --- a/src/compositor.c +++ b/src/compositor.c
@@ -96,6 +96,9 @@ sigfillset(&allsigs); 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 * non-CLOEXEC fd to pass through exec. */ clientfd = dup(sockfd);