PR bin/51253
Nikolay Pavlov
temp at roks.biz
Tue Nov 18 00:43:12 PST 2003
Hi, David.
DM> I've just committed the following patch to -current, which I think
DM> should fix your problem (and other similar potential problems).
DM> I'll MFC the fix in a couple of weeks, all going according to plan.
DM> David.
DM> Index: syslogd.c
DM> ===================================================================
DM> RCS file: /cvs/FreeBSD-CVS/src/usr.sbin/syslogd/syslogd.c,v
DM> retrieving revision 1.116
DM> diff -u -r1.116 syslogd.c
DM> --- syslogd.c 17 May 2003 20:07:54 -0000 1.116
DM> +++ syslogd.c 16 Nov 2003 20:45:40 -0000
DM> @@ -1338,7 +1338,12 @@
DM> logerror(const char *type)
DM> {
DM> char buf[512];
DM> + static int recursed = 0;
DM> + /* If there's an error while trying to log an error, give up. */
DM> + if (recursed)
DM> + return;
DM> + recursed++;
DM> if (errno)
DM> (void)snprintf(buf,
DM> sizeof buf, "syslogd: %s: %s", type, strerror(errno));
DM> @@ -1347,6 +1352,7 @@
DM> errno = 0;
DM> dprintf("%s\n", buf);
DM> logmsg(LOG_SYSLOG|LOG_ERR, buf, LocalHostName, ADDDATE);
DM> + recursed--;
DM> }
DM> static void
Your patch works excellent for my 4.9 box, thanks that found time for
this.
--
Thanks, Nikolay.
More information about the freebsd-stable
mailing list