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 <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2019-02-22 10:37:13 +01:00
parent d76078982e
commit 1a5ba7a3ef
No known key found for this signature in database
GPG Key ID: E4730F97F60286ED

2
main.c
View File

@ -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;
}