[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201101241632.24425.vapier@gentoo.org>
Date: Mon, 24 Jan 2011 16:32:22 -0500
From: Mike Frysinger <vapier@...too.org>
To: libc-ports@...rceware.org
Cc: Roland McGrath <roland@...hat.com>, linasvepstas@...il.com,
Chris Metcalf <cmetcalf@...era.com>,
Arnd Bergmann <arnd@...db.de>,
GLIBC Devel <libc-alpha@...rceware.org>,
linux-kernel@...r.kernel.org
Subject: Re: [BUG] Generic syscalls -- chmod vs. fchmodat
On Monday, January 24, 2011 16:05:14 Roland McGrath wrote:
> POSIX says "A null pathname shall not be successfully resolved." This
> applies to relative pathnames too, and a file name argument to an *at
> function using AT_FDCWD is a relative pathname. So I think there is no
> situation at all in which the empty string should resolve to anything.
> It's generally in the domain of the kernel to enforce these kinds of rules,
> so I think that having the kernel fail with ENOENT for all empty-string
> cases is the right thing to do.
typically, Linux isnt hard pressed to enforce POSIX semantics. that barrier
is the realm of glibc. the *at functions as implemented by Linux can provide
neat semantics where you can open a directory, process a bunch of files via
that fd, and then turn around and operate on the dir itself with NULL or ""
paths. plus, once Linux has shipped with a syscall behavior set, Linus really
doesnt let people change it. which means it's back on glibc's head to provide
POSIX semantics to application.
-mike
Download attachment "signature.asc " of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists