Unlinking objects in a directory with sticky bit set
Matthew Dillon
dillon at apollo.backplane.com
Sun May 3 09:07:11 PDT 2009
:Quoting from sticky(8):
: ... A file in a sticky directory may only be removed or renamed
: by a user if the user has write permission for the directory and the user
: is the owner of the file, the owner of the directory, or the super-user.
:
:So rename(2) in a directory with sticky bit set should also be taken care of.
:Currently there are three commits to be cherry-picked to 2.2 branch:
: 918101d3be679a76c85ea8f47b94e05f8eb11ee5
: ee89633d5330733056052c06919a5dd4c01347bc
: dae8d54f0708cf191cbb06ef6aa43cd570ceea90
:
:The filesystems affected by ee89633d are: ext2fs, hpfs, msdosfs, ntfs,
:nwfs, smbfs, udf, ufs, and HAMMER, but I only tested ufs and HAMMER.
Is rename(2) working properly? I wasn't quite sure from your posting.
It does seem to work properly in my quick test.
:And a very silly nit-pick would be that with these commits the return
:code is changed from EPERM to EACCES. I can't think of a situation
:when that could be a problem, though.
:
I don't mind synchronizing the error code with linux, if someone wants
to figure out what linux returns in these situations.
-Matt
Matthew Dillon
<dillon at backplane.com>
More information about the Bugs
mailing list