[pacman-dev] RootDir using symlinks -> problem

Xavier shiningxc at gmail.com
Fri Oct 5 08:25:01 EDT 2007


On Mon, Oct 01, 2007 at 05:50:12PM -0500, Aaron Griffin wrote:
> On 9/29/07, Xavier <shiningxc at gmail.com> wrote:
> > I don't know how bad is it to use a non standard (glibc specific) feature.
> > This is maybe already done everywhere in pacman, I really don't have the
> > slightest clue about this :)
> 
> This always scares me, but I guess they're saying something similar to
> the fact that due to symlinks and such, the before or after path might
> be larger than PATH_MAX so no one knows how to figure out the buffer
> size.
> 
> For instance.... if we're hundreds of directories deep in a tree,
> "./foo/bar" might be a valid path, but realpath is going to resolve
> the "./" part to the hundreds of directories and overflow PATH_MAX.
> 
> It is an edge case, but the implications are scary.
> 

Actually, I fail to see any reason for using realpath. Any clues?




More information about the pacman-dev mailing list