main: ignore EOVERFLOW when copying xattrs

the kernel returns EOVERFLOW if the rootid cannot be mapped in the
current user namespace when reading the file capabilities
(security.capabilities xattr).

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2022-06-01 11:40:14 +02:00
parent e07e1f09a1
commit f3f993f157
No known key found for this signature in database
GPG Key ID: 67E38F7A8BA21772

6
main.c
View File

@ -2699,7 +2699,11 @@ copy_xattr (int sfd, int dfd, char *buf, size_t buf_size)
s = safe_read_xattr (&v, sfd, it, 256);
if (s < 0)
return -1;
{
if (errno == EOVERFLOW)
continue;
return -1;
}
if (fsetxattr (dfd, it, v, s, 0) < 0)
{