From 7efc54566d33230ec3cfd34d70d9d9c970734a1e Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 2 May 2024 19:46:28 +0200 Subject: [PATCH] (submit/os-utils) 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 --- os/utils.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/os/utils.c b/os/utils.c index d78059251..1f42d5e06 100644 --- a/os/utils.c +++ b/os/utils.c @@ -1368,16 +1368,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 @@ -1412,7 +1402,6 @@ enum BadCode { ArgTooLong, UnprintableArg, EnvTooLong, - OutputIsPipe, InternalError }; @@ -1509,16 +1498,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: @@ -1536,9 +1515,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;