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: YONETANI Tomokazu <qhwt+dfly@xxxxxxxxxx>
Date: Mon, 4 May 2009 13:02:36 +0900

On Sun, May 03, 2009 at 08:27:46PM -0700, Matthew Dillon wrote:
> 
> :The problem is I (as a non-root user) can still rename(2) an object that
> :I do not own, in a sticky directory on HAMMER filesystem.
> :
> :On UFS:
> :# mkdir -m 1777 sticky && touch sticky/ROOT
> :# su -m nobody -c 'cd sticky && mv ROOT R00T && echo HEY'
> :mv: rename ROOT to R00T: Operation not permitted
> :
> :On HAMMER:
> :# mkdir -m 1777 sticky && touch sticky/ROOT
> :# su -m nobody -c 'cd sticky && mv ROOT R00T && echo HEY'
> :HEY
> 
>     test28# su -m nobody -c 'cd sticky && mv ROOT R00T2 && echo HEY'
>     mv: rename ROOT to R00T2: No such file or directory
>     test28#

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 :)

>     There may be a short cut for renaming a file to itself, which is
>     basically a NOP.  I'll track down the path.
> 
> 					-Matt
> 					Matthew Dillon 
> 					<dillon@backplane.com>



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