Re: [patch 06/14] hfsplus: remove hfsplus_permission()

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

 



Hi,

On Thu, 22 May 2008, Miklos Szeredi wrote:

> > No, it's not, it allows for HFS+ specific special case to allow the lookup 
> > of the resource fork.
> 
> Sorry I just don't see how that code would allow anything.  The only
> place hfsplus_permission() is called is from permission() in namei.c,
> and in that case it _is_ equivalent.  Look:
> 
> hfsplus_permission():
> 
> 	if (S_ISREG(inode->i_mode) && mask & MAY_EXEC && !(inode->i_mode & 0111))
> 		return 0;
> 
> permission():
> 
> 		retval = inode->i_op->permission(inode, submask, nd);
> 		if (!retval) {
> 			/*
> 			 * Exec permission on a regular file is denied if none
> 			 * of the execute bits are set.
> 			 *
> 			 * This check should be done by the ->permission()
> 			 * method.
> 			 */
> 			if ((mask & MAY_EXEC) && S_ISREG(inode->i_mode) &&
> 			    !(inode->i_mode & S_IXUGO))
> 				return -EACCES;

That check didn't used to be there and that the HFS+ check is older than 
that might have given you the idea that it at least used to work.
So now the only way for a fs to differentiate between lookup and exec is 
gone... :-(

bye, Roman
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux