xload/xload-1.2.1-setgroups.patch
Filipe Rosset 57adeb1701 update to 1.2.1, built with meson, fixes rhbz#2294799
Signed-off-by: Filipe Rosset <rosset.filipe@gmail.com>
2026-07-21 02:30:12 -03:00

18 lines
473 B
Diff

--- a/xload.c
+++ b/xload.c
@@ -63,6 +63,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <grp.h>
#include <X11/Intrinsic.h>
#include <X11/Xatom.h>
#include <X11/StringDefs.h>
@@ -198,6 +199,7 @@
InitLoadPoint();
#if !defined(_WIN32) || defined(__CYGWIN__)
+ (void) setgroups(0, NULL);
/* reset gid first while still (maybe) root */
if (setgid(getgid()) == -1) {
fprintf(stderr, gettext("%s: setgid failed: %s\n"),