bug in can_delete_file_in_directory
Jeremy Allison
jra at samba.org
Fri Mar 20 23:03:39 GMT 2009
On Fri, Mar 20, 2009 at 11:19:00AM -0700, Herb Lewis wrote:
> This is in samba 3.2 git
>
> in the function can_delete_file_in_directory we have the following test
>
> /* Check primary owner write access. */
> if (current_user.ut.uid == sbuf.st_uid) {
> return (sbuf.st_mode & S_IWUSR) ? True : False;
> }
>
> I believe this is wrong. Shouldn't it just be
>
> /* Check primary owner write access. */
> if ((current_user.ut.uid == sbuf.st_uid) &&
> (sbuf.st_mode & S_IWUSR)) {
> return True;
> }
>
> otherwise we don't check for access granted by some ACL
No, this follows POSIX rules. If you are the owner
of a file, then the permissions on the owner entry
are all that is checked. No other ACLs are examined.
Jeremy.
More information about the samba-technical
mailing list