From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2955 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Further bugs in syslog() Date: Fri, 22 Mar 2013 23:53:51 -0400 Message-ID: <20130323035351.GT20323@brightrain.aerifal.cx> References: <20130323034538.GS20323@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1364010846 14907 80.91.229.3 (23 Mar 2013 03:54:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Mar 2013 03:54:06 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2956-gllmg-musl=m.gmane.org@lists.openwall.com Sat Mar 23 04:54:33 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1UJFXH-0004rn-CY for gllmg-musl@plane.gmane.org; Sat, 23 Mar 2013 04:54:27 +0100 Original-Received: (qmail 27787 invoked by uid 550); 23 Mar 2013 03:54:03 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 27779 invoked from network); 23 Mar 2013 03:54:03 -0000 Content-Disposition: inline In-Reply-To: <20130323034538.GS20323@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2955 Archived-At: On Fri, Mar 22, 2013 at 11:45:39PM -0400, Rich Felker wrote: > Hi all, > > William Haddon's report about syslog prompted me to review the file, > and there seem to be several additional bugs: > > 1. log_ident stores the actual pointer passed by the caller rather > than a copy of the string. This probably works in practice for most > callers but it's definitely not correct. It should be noted that, per glibc's documentation of openlog, it shares this bug. POSIX has no text that allows such an implementation, but I suspect all historic implementations have this bad behavior, so it's possibly an issue that should be raised on the Austin Group tracker... glibc also documents closelog as clearing log_ident to the default value. This behavior does not seem to be permitted (much less required) by the standard. Rich