From: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
To: Rich Felker <dalias@aerifal.cx>
Cc: libc-alpha <libc-alpha@sourceware.org>, musl@lists.openwall.com
Subject: Re: O_EXEC and O_SEARCH
Date: Fri, 22 Feb 2013 23:54:17 -0500 [thread overview]
Message-ID: <CAHGf_=p1XsUTR2MfffTTR6dGHRN5f44WFWCRvLoaz9VJyCT2DA@mail.gmail.com> (raw)
In-Reply-To: <20130222004540.GA8836@brightrain.aerifal.cx>
> Right now, we're offering O_EXEC and O_SEARCH in musl libc, defining
> them as O_PATH. As long as recent Linux is used, this gives nearly
> correct semantics, except that combined with O_NOFOLLOW they do not
> fail when the final component is a symbolic link. I believe it's
> possible to work around this issue on sufficiently modern kernels
> where fstat works on O_PATH file descriptors, but adding the
> workaround whenever O_PATH|O_NOFOLLOW is in the flags would change the
> semantics when O_PATH is used by the caller rather than O_EXEC or
> O_SEARCH, since the value is equal. I'm not sure this is desirable.
I have one more question. If I understand correctly, O_NOFOLLOW is
unspecified in
POSIX. Why do you think the current behavior is not correct?
And, as far as I observed, current linux man pages don't tell us
O_PATH|O_NOFOLLOW
behavior. Is this really intentional result? How do you confirmed?
I mean the current behavior is not natural to me and I doubt it is not
intentional one.
next prev parent reply other threads:[~2013-02-23 4:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-22 0:45 Rich Felker
2013-02-23 3:05 ` KOSAKI Motohiro
2013-02-23 3:17 ` Rich Felker
2013-02-23 3:58 ` KOSAKI Motohiro
2013-02-23 4:33 ` Rich Felker
2013-02-23 5:01 ` KOSAKI Motohiro
2013-02-23 5:05 ` Rich Felker
2013-02-23 5:21 ` KOSAKI Motohiro
2013-02-23 4:54 ` KOSAKI Motohiro [this message]
2013-02-23 5:03 ` Rich Felker
2013-02-23 5:20 ` KOSAKI Motohiro
2013-02-23 5:28 ` KOSAKI Motohiro
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='CAHGf_=p1XsUTR2MfffTTR6dGHRN5f44WFWCRvLoaz9VJyCT2DA@mail.gmail.com' \
--to=kosaki.motohiro@gmail.com \
--cc=dalias@aerifal.cx \
--cc=libc-alpha@sourceware.org \
--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).