Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 05 Oct 2014 15:13:03 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 194132] rm(1) is ignoring more errors than it should in rm_tree(..)
Message-ID:  <bug-194132-8-X4P0EMBsxK@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-194132-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-194132-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194132

Jilles Tjoelker <jilles@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jilles@FreeBSD.org

--- Comment #3 from Jilles Tjoelker <jilles@FreeBSD.org> ---
The problem here is in fts(3), not in rm(1). If fts_read() aborts the traversal
because of a concurrent modification, that is a bug. If a concurrent rm -rf X/Y
causes an rm -rf X to abort, this may cause X/Z to escape removal erroneously.

A possible fix is to use the pathnames to go back to grandparent directories if
opening ".." fails (as with "..", st_dev and st_ino must be checked). A
consequence is that the current directory and fts_accpath in the FTS_DP result
will be different (fts_accpath will contain a slash, which it normally doesn't
if fts is changing directory). Also, this will not work in deep directory trees
with pathnames longer than PATH_MAX.

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-194132-8-X4P0EMBsxK>