Re: 2.6.9-mm1

From: Christoph Hellwig
Date: Wed Oct 27 2004 - 06:21:59 EST


On Fri, Oct 22, 2004 at 09:34:35PM +0200, Roman Zippel wrote:
> Hi,
>
> On Fri, 22 Oct 2004, Christoph Hellwig wrote:
>
> > > > > +hfs-export-type-creator-via-xattr.patch
> > > >
> > > > I haven't heard an answer on the comments on this on on -fsdevel yet..
> > >
> > > To use the generic xattr code? Yes, we're waiting to hear back on that.
> >
> > I'm more concerned about the lacking xattr name prefix as that's a
> > published API.
>
> Below I only added the prefix. The generic code doesn't seem to have that
> many advantages if you have only a single prefix anyway, does it?

It has the advantage that we can move the permission check into sooner,
and maybe we can get rid of the old entry point completely one day,
simplifying the xattr subsystem.

> +int hfs_setxattr(struct dentry *dentry, const char *name,
> + const void *value, size_t size, int flags)
> +{
> + struct inode *inode = dentry->d_inode;
> + struct hfs_find_data fd;
> + hfs_cat_rec rec;
> + struct hfs_cat_file *file;
> + int res;
> +
> + if (!S_ISREG(inode->i_mode) || HFS_IS_RSRC(inode))
> + return -EOPNOTSUPP;

You don't have any permission checks here, or did I miss something?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/