This is the mail archive of the
mailing list for the glibc project.
Re: [BUG] Generic syscalls -- chmod vs. fchmodat
- From: Roland McGrath <roland at redhat dot com>
- To: linasvepstas at gmail dot com
- Cc: Chris Metcalf <cmetcalf at tilera dot com>, Arnd Bergmann <arnd at arndb dot de>, GLIBC Devel <libc-alpha at sourceware dot org>, linux-kernel at vger dot kernel dot org, libc-ports at sourceware dot org
- Date: Mon, 24 Jan 2011 13:05:14 -0800 (PST)
- Subject: Re: [BUG] Generic syscalls -- chmod vs. fchmodat
- References: <AANLkTikhKHnR+7DskxYqWXduX4=tpfgsfL4sNYq+4QDq@mail.gmail.com>
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.