summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Desneux <stephane.desneux@open.eurogiciel.org>2014-04-14 20:44:40 +0200
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>2014-05-20 16:05:57 +0200
commit5ac9c3048611cc8afcfc54c85f5618a562c8f0ec (patch)
treef6e4a62e05f702a8c8dc4efa17dc262f2a7f1354
parentbdb907107b377633a870b164e706a731a2279321 (diff)
downloadweston-sandbox/sdesneux/devel.tar.gz
weston-sandbox/sdesneux/devel.tar.bz2
weston-sandbox/sdesneux/devel.zip
the check to allow only root user had been replaced by a check to see if effective uid is equal or less than 499 499 is the actual value in login.defs for SYS_UID_MAX Change-Id: Ic2b96661df0c939e7f6e066f0bed1d8f7e26bd8f Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
-rw-r--r--src/launcher-util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/launcher-util.c b/src/launcher-util.c
index 1b63458c..47d6edab 100644
--- a/src/launcher-util.c
+++ b/src/launcher-util.c
@@ -160,7 +160,7 @@ weston_launcher_open(struct weston_launcher *launcher,
msg.msg_iovlen = 1;
msg.msg_control = control;
msg.msg_controllen = sizeof control;
-
+
do {
len = recvmsg(launcher->fd, &msg, MSG_CMSG_CLOEXEC);
} while (len < 0 && errno == EINTR);
@@ -404,7 +404,7 @@ weston_launcher_connect(struct weston_compositor *compositor, int tty,
seat_id, tty);
if (r < 0) {
launcher->logind = NULL;
- if (geteuid() == 0) {
+ if (geteuid() <= 499) { /* 499 = SYS_UID_MAX in login.defs, but it should be parsed */
if (setup_tty(launcher, tty) == -1) {
free(launcher);
return NULL;