Article View: net.bugs.4bsd
Article #1617Bug in syslog(3) in 4.2BSD (with fix).
From: Stephen J. Muir
Date: Mon, 04 Aug 1986 00:03
Date: Mon, 04 Aug 1986 00:03
25 lines
1336 bytes
1336 bytes
Index: lib/libc/gen/syslog.c 4.2 Fix
Description:
syslog(3) fails when a %c (where c != 'm') occurs in the string
Repeat-By:
use the following call:
syslog ("%s: %m", "filename");
The string is truncated after the "%s" and no newline is added. The
next call to syslog() (even from another program) will tack it's output
onto the same line as the previous and be processed as one.
Fix:
apply the following patch to /usr/src/lib/libc/gen/syslog.c
73c73
< *b++ = '%', *b++ = c, *b++ = '\0';
---
> *b++ = '%', *b++ = c;
--
EMAIL: stephen@comp.lancs.ac.uk | Post: University of Lancaster,
UUCP: ...!mcvax!ukc!dcl-cs!stephen | Department of Computing,
Phone: +44 524 65201 Ext. 4120 | Bailrigg, Lancaster, UK.
Project:Alvey ECLIPSE Distribution | LA1 4YR
Technical Details
Message-ID:
<335@comp.lancs.ac.uk>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!mcvax!ukc!dcl-cs!stephenShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!mcvax!ukc!dcl-cs!stephen From: stephen@comp.lancs.ac.uk (Stephen J. Muir) Newsgroups: net.bugs.4bsd Subject: Bug in syslog(3) in 4.2BSD (with fix). Message-ID: <335@comp.lancs.ac.uk> Date: Sun, 3-Aug-86 20:03:15 EDT Article-I.D.: comp.335 Posted: Sun Aug 3 20:03:15 1986 Date-Received: Tue, 5-Aug-86 02:04:49 EDT Reply-To: stephen@comp.lancs.ac.uk (Stephen J. Muir) Organization: Department of Computing at Lancaster University, UK. Lines: 25