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>
(cherry picked from commit aef17edd92)
This commit is contained in:
Enrico Weigelt, metux IT consult
2024-05-03 17:58:11 +02:00
committed by Alan Coopersmith
parent 12fc68d5d4
commit eb685f5dba

View File

@@ -1714,11 +1714,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
@@ -1790,13 +1785,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];