os: utils: drop unused NO_OUTPUT_PIPES
This hasn't been used/enabled for over 20 years, so there's probably no reason for keeping it even longer. 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:
parent
6153b89d19
commit
69905a0a28
24
os/utils.c
24
os/utils.c
|
@ -1426,16 +1426,6 @@ PrivsElevated(void)
|
|||
#define REMOVE_LONG_ENV 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Disallow stdout or stderr as pipes? It's possible to block the X server
|
||||
* when piping stdout+stderr to a pipe.
|
||||
*
|
||||
* Don't enable this because it looks like it's going to cause problems.
|
||||
*/
|
||||
#ifndef NO_OUTPUT_PIPES
|
||||
#define NO_OUTPUT_PIPES 0
|
||||
#endif
|
||||
|
||||
/* Check args and env only if running setuid (euid == 0 && euid != uid) ? */
|
||||
#ifndef CHECK_EUID
|
||||
#ifndef WIN32
|
||||
|
@ -1470,7 +1460,6 @@ enum BadCode {
|
|||
ArgTooLong,
|
||||
UnprintableArg,
|
||||
EnvTooLong,
|
||||
OutputIsPipe,
|
||||
InternalError
|
||||
};
|
||||
|
||||
|
@ -1567,16 +1556,6 @@ CheckUserParameters(int argc, char **argv, char **envp)
|
|||
}
|
||||
}
|
||||
}
|
||||
#if NO_OUTPUT_PIPES
|
||||
if (!bad) {
|
||||
struct stat buf;
|
||||
|
||||
if (fstat(fileno(stdout), &buf) == 0 && S_ISFIFO(buf.st_mode))
|
||||
bad = OutputIsPipe;
|
||||
if (fstat(fileno(stderr), &buf) == 0 && S_ISFIFO(buf.st_mode))
|
||||
bad = OutputIsPipe;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
switch (bad) {
|
||||
case NotBad:
|
||||
|
@ -1594,9 +1573,6 @@ CheckUserParameters(int argc, char **argv, char **envp)
|
|||
case EnvTooLong:
|
||||
ErrorF("Environment variable `%s' is too long\n", e);
|
||||
break;
|
||||
case OutputIsPipe:
|
||||
ErrorF("Stdout and/or stderr is a pipe\n");
|
||||
break;
|
||||
case InternalError:
|
||||
ErrorF("Internal Error\n");
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue