Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Date: Tue, 22 Nov 2011 00:49:13 +0100
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: realpath of nonreadable files

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?

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.