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 <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1518>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-05-03 17:58:11 +02:00 committed by Marge Bot
parent 4b94e4fa08
commit aef17edd92

View File

@ -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];