All of lore.kernel.org
 help / color / mirror / Atom feed
* readlink(2) handling of empty strings
@ 2014-09-29 23:33 Ben Hutchings
       [not found] ` <1412033603.9388.68.camel-/+tVBieCtBitmTQ+vhA3Yw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Hutchings @ 2014-09-29 23:33 UTC (permalink / raw)
  To: linux-man-u79uwXL29TY76Z2rM5mHXA; +Cc: Al Viro

[-- Attachment #1: Type: text/plain, Size: 643 bytes --]

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 #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-30 11:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-29 23:33 readlink(2) handling of empty strings Ben Hutchings
     [not found] ` <1412033603.9388.68.camel-/+tVBieCtBitmTQ+vhA3Yw@public.gmane.org>
2014-09-30  8:10   ` Michael Kerrisk (man-pages)
     [not found]     ` <542A655A.3090406-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-09-30 11:38       ` Ben Hutchings

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.