DragonFly bugs List (threaded) for 2009-05
DragonFly BSD
DragonFly bugs List (threaded) for 2009-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Unlinking objects in a directory with sticky bit set


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sun, 3 May 2009 22:38:29 -0700 (PDT)

:This is expected, because the original file(ARE OH OH TEE) has been
:renamed to (ARE ZERO ZERO TEE).  I guess ZEROs and OHs are not very
:distictive on your monitor :)

    Nope!  Ok, you *could* have used something more obvious there :-)

    In anycase, I've tracked it down.   The rename code was not checking
    the sticky bit for the rename target at all, so it happily overwrite
    the file owned by someone else.  It was doing a VDELETE test for the
    rename source (which tests the sticky bit) and a VCREATE test for the
    rename target (which is designed for O_CREAT and doesn't deal with
    rename's file replacement, so it wasn't).  I added a VRENAME and
    NLC_RENAME so I could properly code testing of the rename-target.

    I'll commit a fix in a few minutes once I finish testing it.  

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]