diff options
author | Dave Kleikamp <shaggy@austin.ibm.com> | 2006-11-02 11:50:40 -0500 |
---|---|---|
committer | Dave Kleikamp <shaggy@austin.ibm.com> | 2006-11-02 11:50:40 -0500 |
commit | d572b87946f8c598b3cad86a7913862dd48daadb (patch) | |
tree | 45c2fbfc33ee6f04cb78fa9b1f5e0d6d9b8fafc9 /fs | |
parent | 89f68225876db7df638de2884b561facb1870239 (diff) |
JFS: Remove redundant xattr permission checking
The vfs handles most permissions for setting and retrieving xattrs.
This patch removes a redundant and wrong check so that it won't override
the correct behavior which is being fixed in the vfs.
Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/jfs/xattr.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/jfs/xattr.c b/fs/jfs/xattr.c index 4c7985ebca92..b753ba216450 100644 --- a/fs/jfs/xattr.c +++ b/fs/jfs/xattr.c | |||
@@ -756,6 +756,11 @@ static int can_set_system_xattr(struct inode *inode, const char *name, | |||
756 | return -EOPNOTSUPP; | 756 | return -EOPNOTSUPP; |
757 | } | 757 | } |
758 | 758 | ||
759 | /* | ||
760 | * Most of the permission checking is done by xattr_permission in the vfs. | ||
761 | * The local file system is responsible for handling the system.* namespace. | ||
762 | * We also need to verify that this is a namespace that we recognize. | ||
763 | */ | ||
759 | static int can_set_xattr(struct inode *inode, const char *name, | 764 | static int can_set_xattr(struct inode *inode, const char *name, |
760 | const void *value, size_t value_len) | 765 | const void *value, size_t value_len) |
761 | { | 766 | { |
@@ -771,10 +776,6 @@ static int can_set_xattr(struct inode *inode, const char *name, | |||
771 | strncmp(name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN)) | 776 | strncmp(name, XATTR_OS2_PREFIX, XATTR_OS2_PREFIX_LEN)) |
772 | return -EOPNOTSUPP; | 777 | return -EOPNOTSUPP; |
773 | 778 | ||
774 | if (!S_ISREG(inode->i_mode) && | ||
775 | (!S_ISDIR(inode->i_mode) || inode->i_mode &S_ISVTX)) | ||
776 | return -EPERM; | ||
777 | |||
778 | return 0; | 779 | return 0; |
779 | } | 780 | } |
780 | 781 | ||