From: Vasiliy Kulikov <segoon@openwall.com>
To: musl@lists.openwall.com
Subject: Re: musl bugs
Date: Wed, 28 Sep 2011 11:54:46 +0400 [thread overview]
Message-ID: <20110928075446.GA3840@albatros> (raw)
In-Reply-To: <20110927210004.GO132@brightrain.aerifal.cx>
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
next prev parent reply other threads:[~2011-09-28 7:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-27 16:06 Vasiliy Kulikov
2011-09-27 21:00 ` Rich Felker
2011-09-28 7:54 ` Vasiliy Kulikov [this message]
2011-09-28 15:40 ` Rich Felker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110928075446.GA3840@albatros \
--to=segoon@openwall.com \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).