[ogfs-dev]Weird permission checking on unlink
Howdy, folks.
I've run into a strange problem removing files in OpenGFS. Here's the
scenario:
As root:
# mkdir /ogfs/test
# chmod 707 /ogfs/test
As some other user:
$ touch /ogfs/test/file
$ rm /ogfs/test/file
The touch succeeds, but the rm fails with Operation not permitted (EPERM).
Now as root:
# chown other_user /ogfs/test
And as other_user:
$ rm /ogfs/test/file
Now the rm succeeds.
This problem seems to be in the ogfs_dir_permissions() function, introduced
in rev 1.4 of src/fs/arch_linux_2_4/inode_linux.c. It was added in Jan 2002
to fix a problem where the group list was not being honored for
unlink/renames. But it has the nasty side-effect of ignoring the world
permission bits altogether.
As a reference point, I took a look at the ext3 code, and it does no
permission checking at all in ext3_unlink. Instead it leaves the checks to
the VFS layer, and expects the operation to be fully authorized by the time
it is called.
Can anyone see a reason why OpenGFS should not be trusting the VFS layer's
permission checks?
-steve
--
Steve Landherr -- steve-sf@xxxxxxxxxxxxx
San Francisco, California
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Opengfs-devel mailing list
Opengfs-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/opengfs-devel
[Site Home]
[Kernel list]
[Security]
[Bugtraq]
[Photo]
[Yosemite]
[MIPS Linux]
[ARM Linux]
[DVD Store]
[Linux Clusters]
[Linux RAID]
[Linux Resources]