Skip to content

Commit

Permalink
main: do not copyup opaque xattr
Browse files Browse the repository at this point in the history
when performing the copyup, do not copy the private xattrs.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
  • Loading branch information
giuseppe committed Jan 15, 2020
1 parent 214d606 commit ce93aba
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2328,7 +2328,13 @@ copy_xattr (int sfd, int dfd, char *buf, size_t buf_size)
for (it = buf; it - buf < xattr_len; it += strlen (it) + 1)
{
cleanup_free char *v = NULL;
ssize_t s = safe_read_xattr (&v, sfd, it, 256);
ssize_t s;

if (has_prefix (it, XATTR_PREFIX)
|| has_prefix (it, PRIVILEGED_XATTR_PREFIX))
continue;

s = safe_read_xattr (&v, sfd, it, 256);
if (s < 0)
return -1;

Expand Down

0 comments on commit ce93aba

Please sign in to comment.