summaryrefslogtreecommitdiffstats
path: root/fs/ext3/xattr_user.c
diff options
context:
space:
mode:
authorakpm@osdl.org <akpm@osdl.org>2006-01-10 05:51:58 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-10 17:01:30 +0100
commitc37ef806a3e1c0bca65fd03b7590d56d19625da4 (patch)
tree858caa56d151f28a98765e993a503c2481ec440c /fs/ext3/xattr_user.c
parent[PATCH] remove ext2 xattr permission checks (diff)
downloadlinux-c37ef806a3e1c0bca65fd03b7590d56d19625da4.tar.xz
linux-c37ef806a3e1c0bca65fd03b7590d56d19625da4.zip
[PATCH] remove ext3 xattr permission checks
) From: Christoph Hellwig <hch@lst.de> remove checks now in the VFS Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ext3/xattr_user.c')
-rw-r--r--fs/ext3/xattr_user.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/fs/ext3/xattr_user.c b/fs/ext3/xattr_user.c
index e907cae7a07c..a85a0a17c4fd 100644
--- a/fs/ext3/xattr_user.c
+++ b/fs/ext3/xattr_user.c
@@ -37,16 +37,10 @@ static int
ext3_xattr_user_get(struct inode *inode, const char *name,
void *buffer, size_t size)
{
- int error;
-
if (strcmp(name, "") == 0)
return -EINVAL;
if (!test_opt(inode->i_sb, XATTR_USER))
return -EOPNOTSUPP;
- error = permission(inode, MAY_READ, NULL);
- if (error)
- return error;
-
return ext3_xattr_get(inode, EXT3_XATTR_INDEX_USER, name, buffer, size);
}
@@ -54,19 +48,10 @@ static int
ext3_xattr_user_set(struct inode *inode, const char *name,
const void *value, size_t size, int flags)
{
- int error;
-
if (strcmp(name, "") == 0)
return -EINVAL;
if (!test_opt(inode->i_sb, XATTR_USER))
return -EOPNOTSUPP;
- if ( !S_ISREG(inode->i_mode) &&
- (!S_ISDIR(inode->i_mode) || inode->i_mode & S_ISVTX))
- return -EPERM;
- error = permission(inode, MAY_WRITE, NULL);
- if (error)
- return error;
-
return ext3_xattr_set(inode, EXT3_XATTR_INDEX_USER, name,
value, size, flags);
}