From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/486 Path: news.gmane.org!not-for-mail From: Vasiliy Kulikov Newsgroups: gmane.linux.lib.musl.general Subject: Re: musl bugs Date: Wed, 28 Sep 2011 11:54:46 +0400 Message-ID: <20110928075446.GA3840@albatros> References: <20110927160646.GA23877@albatros> <20110927210004.GO132@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1317196556 22282 80.91.229.12 (28 Sep 2011 07:55:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 28 Sep 2011 07:55:56 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-487-gllmg-musl=m.gmane.org@lists.openwall.com Wed Sep 28 09:55:51 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1R8oze-0003ez-K6 for gllmg-musl@lo.gmane.org; Wed, 28 Sep 2011 09:55:50 +0200 Original-Received: (qmail 1935 invoked by uid 550); 28 Sep 2011 07:55:50 -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 1927 invoked from network); 28 Sep 2011 07:55:49 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=Bt21+NKomNTGduKq303fM41WirqHOpwSf42ckJbLtrc=; b=SaACVasHT/ISWvvF4JWO78266BxzTDCIPly0Jr9St27bAg0sZWnpR4o+7EMspKr/Zd +jf0NMankLBgTw+/IB7Mn+2Jayhz+irFmSKQqKZHCAKMyH1BoOICrHe30MxzMUR/5KMo td82qtm+pT7mFMMhdsrGfJb8uxAEIDCv2hlEk= Original-Sender: Vasiliy Kulikov Content-Disposition: inline In-Reply-To: <20110927210004.GO132@brightrain.aerifal.cx> User-Agent: Mutt/1.5.20 (2009-06-14) Xref: news.gmane.org gmane.linux.lib.musl.general:486 Archived-At: On Tue, Sep 27, 2011 at 17:00 -0400, Rich Felker wrote: > On Tue, Sep 27, 2011 at 08:06:46PM +0400, Vasiliy Kulikov wrote: > > Hi Rich, > > > > getmntent_r(): > > - fgets() should be checked for too small buffer. > > And what should happen? ERANGE? This non-standardized stuff is so > poorly documented... Should it seek back and allow you to read the > entry next time with a larger buffer? Or should it just fail? The right thing would be seeking back, but at least glibc simply ignores the error and seeks to the end of line. I don't known whether seek back is better given this behaviour is not documented... To be consistent with glibc IMHO it should seek till the EOL, but return the error. > > execvp(): > > - As the code chooses the first possible path in $PATH, the > > /usr/local/bin should be the last path. POSIX says it should start > > with null path (current dir), but it is crazy. > > Where does it say this? I see (in the execvp documentation in POSIX > 2008): "If this environment variable is not present, the results of > the search are implementation-defined." Oops, sorry, I've confused "man 3p" and "man 3". Indeed, POSIX doesn't define any default path. > In particular, unless you use > sysconf to obtain and set a default PATH, there's no implication that > the standard utilities should be in the search. I put /usr/local/bin > first because the idea is that you use it locally to override > possibly-shared/distro-provided binaries in /usr/bin and /bin. Hmm, looks like this is a distro specific thing. Given it is not standardized, it shouldn't be an issue (unless some broken app relies on specific path sets). Thanks, -- Vasiliy