git://git.camperquake.de
/
zfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use directory xattrs for symlinks
[zfs.git]
/
module
/
zfs
/
zpl_xattr.c
diff --git
a/module/zfs/zpl_xattr.c
b/module/zfs/zpl_xattr.c
index
dca1ad6
..
d79d35b
100644
(file)
--- a/
module/zfs/zpl_xattr.c
+++ b/
module/zfs/zpl_xattr.c
@@
-438,6
+438,10
@@
zpl_xattr_set_sa(struct inode *ip, const char *name, const void *value,
if (error == -ENOENT)
error = zpl_xattr_set_dir(ip, name, NULL, 0, flags, cr);
} else {
if (error == -ENOENT)
error = zpl_xattr_set_dir(ip, name, NULL, 0, flags, cr);
} else {
+ /* Do not allow SA xattrs in symlinks (issue #1648) */
+ if (S_ISLNK(ip->i_mode))
+ return (-EMLINK);
+
/* Limited to 32k to keep nvpair memory allocations small */
if (size > DXATTR_MAX_ENTRY_SIZE)
return (-EFBIG);
/* Limited to 32k to keep nvpair memory allocations small */
if (size > DXATTR_MAX_ENTRY_SIZE)
return (-EFBIG);