From 6924679ffff3f30c818f0778396399b8785bd6ca Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Mon, 29 Jan 2024 12:43:10 +0000 Subject: [PATCH] util: check for setgid() as well in __normal_user() Cc: mesa-stable Part-of: (cherry picked from commit 501f78fdbae91c889c1c472265ab930c3e36b9bd) --- .pick_status.json | 2 +- src/util/u_debug.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 41630064621..843b2d57bb3 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -204,7 +204,7 @@ "description": "util: check for setgid() as well in __normal_user()", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/util/u_debug.h b/src/util/u_debug.h index 69e0430d09b..2f1a2dabed1 100644 --- a/src/util/u_debug.h +++ b/src/util/u_debug.h @@ -399,7 +399,7 @@ __normal_user(void) #if defined(_WIN32) return true; #else - return geteuid() == getuid(); + return geteuid() == getuid() && getegid() == getgid(); #endif }