mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
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:
committed by
Alan Coopersmith
parent
12fc68d5d4
commit
eb685f5dba
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user