Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHGf_=p1XsUTR2MfffTTR6dGHRN5f44WFWCRvLoaz9VJyCT2DA@mail.gmail.com>
Date: Fri, 22 Feb 2013 23:54:17 -0500
From: KOSAKI Motohiro <kosaki.motohiro@...il.com>
To: Rich Felker <dalias@...ifal.cx>
Cc: libc-alpha <libc-alpha@...rceware.org>, musl@...ts.openwall.com
Subject: Re: O_EXEC and O_SEARCH

> 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.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.