mirror of https://gitee.com/openkylin/linux.git
JFS: Allow security.* xattrs to be set on symlinks
All of the different xattr namespaces have different rules. user.* and ACL's are not allowed on symlinks, and since these were the first xattrs implemented, I assumed there was no need to support xattrs on symlinks. This one-line patch should fix it. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
This commit is contained in:
parent
f7f24758ac
commit
6211502d7e
|
@ -781,7 +781,7 @@ static int can_set_xattr(struct inode *inode, const char *name,
|
|||
if (IS_RDONLY(inode))
|
||||
return -EROFS;
|
||||
|
||||
if (IS_IMMUTABLE(inode) || IS_APPEND(inode) || S_ISLNK(inode->i_mode))
|
||||
if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
|
||||
return -EPERM;
|
||||
|
||||
if(strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN) == 0)
|
||||
|
|
Loading…
Reference in New Issue