mailing list of musl libc
 help / color / mirror / code / Atom feed
* realpath of nonreadable files
@ 2011-11-21 23:49 Szabolcs Nagy
  0 siblings, 0 replies; only message in thread
From: Szabolcs Nagy @ 2011-11-21 23:49 UTC (permalink / raw)
  To: musl

i guess this is known but i'll note it anyway:

realpath opens the filename so if we have no read permission
to the last component the call will fail with EACCES

this is not consistent with glibc which walks the path
and stats along the way so only fails if an intermediate
path component is not readable or not searchable

musl seems to be posix compliant, but the spec is not very clear
http://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html

eg compared to stat where 'path prefix' is explicitly specified
http://pubs.opengroup.org/onlinepubs/9699919799/functions/stat.html

is it a glibc bug? posix bug?
maybe add a comment about this in realpath.c?



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-11-21 23:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-21 23:49 realpath of nonreadable files Szabolcs Nagy

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).