From: Todd C. Miller Date: Tue, 26 Oct 2004 22:20:18 +0000 (+0000) Subject: Add NO_STDERR flag. X-Git-Tag: SUDO_1_7_0~859 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=899e22194e92d04acc93dec8f007738f7e9d2614;p=sudo Add NO_STDERR flag. --- diff --git a/logging.c b/logging.c index c04f160c2..fb9ff9cf0 100644 --- a/logging.c +++ b/logging.c @@ -395,10 +395,12 @@ log_error(va_alist) /* * Tell the user. */ - if (flags & USE_ERRNO) - warn("%s", message); - else - warnx("%s", message); + if (!ISSET(flags, NO_STDERR)) { + if (flags & USE_ERRNO) + warn("%s", message); + else + warnx("%s", message); + } /* * Send a copy of the error via mail. diff --git a/logging.h b/logging.h index 845d39238..add20a55d 100644 --- a/logging.h +++ b/logging.h @@ -34,6 +34,7 @@ #define USE_ERRNO 0x02 #define NO_MAIL 0x04 #define NO_EXIT 0x08 +#define NO_STDERR 0x10 /* * Maximum number of characters to log per entry. The syslogger