readlink(2) handling of empty strings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



readlink(2) claims:

       Since  Linux 2.6.39, pathname can be an empty string, in which case the
       call operates on the file referred to by dirfd  (which  may  have  been
       obtained using the open(2) O_PATH flag).  In this case, dirfd can refer
       to any type of file, not just a directory.

The last sentence seems to be incorrect.  dirfd must refer to a symlink
that has been opened using the O_PATH flag.  (The symlink could refer to
a file, directory, or nothing, but opening with O_PATH doesn't resolve
it.)

Ben.

-- 
Ben Hutchings
The two most common things in the universe are hydrogen and stupidity.

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux