weston-launch: Set all groups for user
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> https://bugs.freedesktop.org/show_bug.cgi?id=65933
This commit is contained in:
committed by
Kristian Høgsberg
parent
27b1793857
commit
735302ea2d
+1
-1
@@ -52,7 +52,7 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[],
|
|||||||
[[#include <time.h>]])
|
[[#include <time.h>]])
|
||||||
AC_CHECK_HEADERS([execinfo.h])
|
AC_CHECK_HEADERS([execinfo.h])
|
||||||
|
|
||||||
AC_CHECK_FUNCS([mkostemp strchrnul])
|
AC_CHECK_FUNCS([mkostemp strchrnul initgroups])
|
||||||
|
|
||||||
COMPOSITOR_MODULES="wayland-server >= 1.1.90 pixman-1"
|
COMPOSITOR_MODULES="wayland-server >= 1.1.90 pixman-1"
|
||||||
|
|
||||||
|
|||||||
@@ -631,9 +631,13 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (setgid(wl.pw->pw_gid) < 0 ||
|
if (setgid(wl.pw->pw_gid) < 0 ||
|
||||||
|
#ifdef HAVE_INITGROUPS
|
||||||
|
initgroups(wl.pw->pw_name, wl.pw->pw_gid) < 0 ||
|
||||||
|
#endif
|
||||||
setuid(wl.pw->pw_uid) < 0)
|
setuid(wl.pw->pw_uid) < 0)
|
||||||
error(1, errno, "dropping privilidges failed");
|
error(1, errno, "dropping privilidges failed");
|
||||||
|
|
||||||
|
|
||||||
if (sleep_fork) {
|
if (sleep_fork) {
|
||||||
if (wl.verbose)
|
if (wl.verbose)
|
||||||
printf("weston-launch: waiting %d seconds\n", sleep_fork);
|
printf("weston-launch: waiting %d seconds\n", sleep_fork);
|
||||||
|
|||||||
Reference in New Issue
Block a user