[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1Jz5gq-0007F4-AQ@pomaz-ex.szeredi.hu>
Date: Thu, 22 May 2008 09:58:20 +0200
From: Miklos Szeredi <miklos@...redi.hu>
To: zippel@...ux-m68k.org
CC: miklos@...redi.hu, linux-fsdevel@...r.kernel.org,
hch@...radead.org, viro@...IV.linux.org.uk,
linux-kernel@...r.kernel.org
Subject: Re: [patch 06/14] hfsplus: remove hfsplus_permission()
> > From: Miklos Szeredi <mszeredi@...e.cz>
> >
> > I'm not sure what this function is trying to achieve, but it's not
> > succeeding: the condition for which it is returning zero is exactly
> > the same as checked by permission(), which results in -EACCES.
> >
> > So in the end this is equivalent to the default action.
>
> 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;
Miklos
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists