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 20:27:46 -0700 (PDT)

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

    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]