From f3f993f1572ad7196c9c031ec145fcf9376c5ed0 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 1 Jun 2022 11:40:14 +0200 Subject: [PATCH] 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 --- main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 68680ab..357eee3 100644 --- a/main.c +++ b/main.c @@ -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) {