From 1a5ba7a3efb9ef3d2f727657bd5ffd7310fc327a Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Fri, 22 Feb 2019 10:37:13 +0100 Subject: [PATCH] fuse-overlayfs: ignore xattrs copy errors when not supported it solves this error on copy_xattrs when the underlying file system is overlay: flistxattr(9, "security.selinux\0", 1048576) = 17 fgetxattr(9, "security.selinux", "system_u:object_r:container_file"..., 256) = 48 fsetxattr(10, "security.selinux", "system_u:object_r:container_file"..., 48, 0) = -1 Signed-off-by: Giuseppe Scrivano --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index d25adf4..713cf4d 100644 --- a/main.c +++ b/main.c @@ -1765,7 +1765,7 @@ copy_xattr (int sfd, int dfd, char *buf, size_t buf_size) if (fsetxattr (dfd, it, v, s, 0) < 0) { - if (errno == EINVAL) + if (errno == EINVAL || errno == EOPNOTSUPP) continue; return -1; }