From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: Roland McGrath <roland-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linasvepstas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
Chris Metcalf <cmetcalf-kv+TWInifGbQT0dZR+AlfA@public.gmane.org>,
GLIBC Devel <libc-alpha-9JcytcrH/bA+uJoB2kUjGw@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
libc-ports-9JcytcrH/bA+uJoB2kUjGw@public.gmane.org,
linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
Subject: Re: [BUG] Generic syscalls -- chmod vs. fchmodat
Date: Tue, 25 Jan 2011 21:04:57 +0100 [thread overview]
Message-ID: <201101252104.58011.arnd@arndb.de> (raw)
In-Reply-To: <20110125183437.7C6C2180999-nL1rrgvulkc2UH6IwYuUx0EOCMrvLtNR@public.gmane.org>
On Tuesday 25 January 2011 19:34:37 Roland McGrath wrote:
> I don't think this was part of the original intent when the calls were
> added, but I suppose it makes sense.
More importantly, even if it was never meant this way, anyone could have
assumed that it was and started using the system call in this way.
> > Treating the empty string special for AT_FDCWD is rather pointless, but
> > at least consistent.
>
> I agree about the consistency point. However, one could also call it
> consistent if the empty string fails to resolve when operating on either a
> directory file descriptor or AT_FDCWD but works on a non-directory file
> descriptor.
Yes.
> POSIX does not mandate that *at calls fail with ENOTDIR when
> passed a non-directory file descriptor (it's a "may fail" error, not a
> "shall fail" error). So that behavior would be consistent both with the
> POSIX requirements as I read them, and with the desire you mentioned to let
> the fblahat system call serve to implement fblah as well as blah. Then
> libc would not have to wrap the *at calls with any special check to conform
> to POSIX.
Makes sense.
Arnd
next prev parent reply other threads:[~2011-01-25 20:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <AANLkTikhKHnR+7DskxYqWXduX4=tpfgsfL4sNYq+4QDq@mail.gmail.com>
[not found] ` <AANLkTikhKHnR+7DskxYqWXduX4=tpfgsfL4sNYq+4QDq-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-01-25 14:29 ` [BUG] Generic syscalls -- chmod vs. fchmodat Arnd Bergmann
[not found] ` <201101251529.24779.arnd-r2nGTMty4D4@public.gmane.org>
2011-01-25 17:45 ` Roland McGrath
[not found] ` <20110125174515.C1DC2183C19-nL1rrgvulkc2UH6IwYuUx0EOCMrvLtNR@public.gmane.org>
2011-01-25 18:21 ` Arnd Bergmann
[not found] ` <201101251921.15184.arnd-r2nGTMty4D4@public.gmane.org>
2011-01-25 18:34 ` Roland McGrath
[not found] ` <20110125183437.7C6C2180999-nL1rrgvulkc2UH6IwYuUx0EOCMrvLtNR@public.gmane.org>
2011-01-25 20:04 ` Arnd Bergmann [this message]
2011-01-25 18:52 ` Mike Frysinger
[not found] ` <201101251352.03079.vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2011-01-25 19:56 ` Eric Blake
2011-01-25 20:31 ` Eric Blake
2011-01-25 21:32 ` Eric Blake
2011-01-25 22:10 ` Linas Vepstas
2011-02-10 18:12 ` Andries Brouwer
[not found] ` <20110210181221.GA19413-ek1Qb6IBo2Pz+pZb47iToQ@public.gmane.org>
2011-02-10 18:17 ` Roland McGrath
2011-02-11 9:11 ` Andreas Schwab
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=201101252104.58011.arnd@arndb.de \
--to=arnd-r2ngtmty4d4@public.gmane.org \
--cc=cmetcalf-kv+TWInifGbQT0dZR+AlfA@public.gmane.org \
--cc=libc-alpha-9JcytcrH/bA+uJoB2kUjGw@public.gmane.org \
--cc=libc-ports-9JcytcrH/bA+uJoB2kUjGw@public.gmane.org \
--cc=linasvepstas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=roland-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org \
/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.
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).