[PATCH xserver v2 2/4] os: use PrivsElevated instead of a manual check

Ben Crocker bcrocker at redhat.com
Tue Mar 13 21:46:35 UTC 2018


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

Signed-off-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
Reviewed-by: Ben Crocker <bcrocker at redhat.com>
Reviewed-by: Antoine Martin <antoine at nagafix.co.uk>
Tested-by: Ben Crocker <bcrocker at redhat.com>
---
 os/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/os/utils.c b/os/utils.c
index 4305dab26..6e3c16869 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -1863,7 +1863,7 @@ CheckUserParameters(int argc, char **argv, char **envp)
     char *a, *e = NULL;
 
 #if CHECK_EUID
-    if (geteuid() == 0 && getuid() != geteuid())
+    if (PrivsElevated())
 #endif
     {
         /* Check each argv[] */
-- 
2.13.6



More information about the xorg-devel mailing list