[BUG] Generic syscalls -- chmod vs. fchmodat

Mike Frysinger vapier@gentoo.org
Tue Jan 25 00:31:00 GMT 2011


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20110125/8074bd84/attachment.sig>


More information about the Libc-alpha mailing list