On Wed, Sep 17, 2014 at 06:08:45PM -0400, Joshua Judson Rosen wrote:
> On 2014-09-17 12:52, Cathey, Jim wrote:
> >Pretty sure 'our' upstream rm (in a prior life) expressly
> >prohibited -r on starting paths that contained .. members.
> >Too many weirdo cases where you would get into trouble.
> 
> GNU rm opens the top-level directory and uses unlinkat(), fstatat(), etc. to 
> remove
> files and subdirectories without having to resolve the paths for every
> file/directory processed; so it runs into the problem (that some ".." link no
> longer exists) only when it finally reaches that top-level directory.
> It still refuses to operate on paths that _end_ in "/.." (or "/.").

This is explicitly required by POSIX.
Which implies that determining a canonical name should not be done.

HTH,
Isaac Dunham

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to