[Bug libc/5778] pathconf(path,_PC_CHOWN_RESTRICTED) does not work correctly under Linux

axel dot philipp at mtu dot de sourceware-bugzilla@sourceware.org
Mon Mar 10 16:18:00 GMT 2008


------- Additional Comments From axel dot philipp at mtu dot de  2008-03-10 16:17 -------
Thanks for the patch.
When I look at the explanation in posix/unistd.h
   If any is defined as other than -1, the corresponding
   option is true for all files.  If a symbol is not defined at all, the value
   for a specific file can be obtained from `pathconf' and `fpathconf'.
I wonder whether _POSIX_CHOWN_RESTRICTED shouldn't be undefined instead of 
being set to 0.

XFS was just an example. Linux also allows unrestricted chown on NFS mounted 
filesystems if the NFS server is configured so. It's certainly difficult for 
glibc to handle such cases as long as the kernel does not provide a query 
interface for pathconf. Perhaps errno could be set to EINVAL (in the meaning of 
not implemented) in such cases.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=5778

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the Glibc-bugs mailing list