diff options
author | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2013-10-01 12:20:29 +0200 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-10-01 10:41:59 -0700 |
commit | d7865b2f754a5e7041536f7ac1825792a1d45881 (patch) | |
tree | b8a723a14e6ad5e56b0138ac7a2c7422cc96c7d4 /src/weston-launch.c | |
parent | 9cefc647cc85476beec71b71e8a440591a3709c0 (diff) | |
download | weston-d7865b2f754a5e7041536f7ac1825792a1d45881.tar.gz |
weston-launch: Only drop privileges if running as root
Diffstat (limited to 'src/weston-launch.c')
-rw-r--r-- | src/weston-launch.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/weston-launch.c b/src/weston-launch.c index 525c61c0..1b560af2 100644 --- a/src/weston-launch.c +++ b/src/weston-launch.c @@ -577,7 +577,8 @@ launch_compositor(struct weston_launch *wl, int argc, char *argv[]) if (wl->new_user) setup_session(wl); - drop_privileges(wl); + if (geteuid() == 0) + drop_privileges(wl); setenv_fd("WESTON_TTY_FD", wl->tty); setenv_fd("WESTON_LAUNCHER_SOCK", wl->sock[1]); |