Enforce that all extended attributes have at most one namespace bit.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
#define xfs_ascii_ci_hashname libxfs_ascii_ci_hashname
+#define xfs_attr_check_namespace libxfs_attr_check_namespace
#define xfs_attr_get libxfs_attr_get
#define xfs_attr_leaf_newentsize libxfs_attr_leaf_newentsize
#define xfs_attr_namecheck libxfs_attr_namecheck
}
}
+ if (!libxfs_attr_check_namespace(currententry->flags)) {
+ do_warn(
+ _("multiple namespaces for shortform attribute %d in inode %" PRIu64 "\n"),
+ i, ino);
+ junkit = 1;
+ }
+
/* namecheck checks for null chars in attr names. */
if (!libxfs_attr_namecheck(currententry->flags,
currententry->nameval,
break;
}
+ if (!libxfs_attr_check_namespace(entry->flags)) {
+ do_warn(
+ _("multiple namespaces for attribute entry %d in attr block %u, inode %" PRIu64 "\n"),
+ i, da_bno, ino);
+ clearit = 1;
+ break;
+ }
+
if (entry->flags & XFS_ATTR_INCOMPLETE) {
/* we are inconsistent state. get rid of us */
do_warn(