From aef17edd92949e4fc246fdcc3d313f929f5c63c5 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 3 May 2024 17:58:11 +0200 Subject: [PATCH] os: utils: drop obsolete REMOVE_ENV_LD conditional This always had been set since it's incarnation back two decades ago, on XFree86 4.3.0.1. Probably no need to keep that around anymore. Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- os/utils.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/os/utils.c b/os/utils.c index 3143ad583..6db344403 100644 --- a/os/utils.c +++ b/os/utils.c @@ -1416,11 +1416,6 @@ PrivsElevated(void) * external wrapper utility. */ -/* Consider LD* variables insecure? */ -#ifndef REMOVE_ENV_LD -#define REMOVE_ENV_LD 1 -#endif - /* Check args and env only if running setuid (euid == 0 && euid != uid) ? */ #ifndef CHECK_EUID #ifndef WIN32 @@ -1490,13 +1485,11 @@ CheckUserParameters(int argc, char **argv, char **envp) for (i = 0; envp[i]; i++) { /* Check for bad environment variables and values */ -#if REMOVE_ENV_LD while (envp[i] && (strncmp(envp[i], "LD", 2) == 0)) { for (j = i; envp[j]; j++) { envp[j] = envp[j + 1]; } } -#endif if (envp[i] && (strlen(envp[i]) > MAX_ENV_LENGTH)) { for (j = i; envp[j]; j++) { envp[j] = envp[j + 1];