From 857907469fecda4652d6cc2d3fe164bde7634f72 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Tue, 6 Apr 2021 19:30:26 +0100
Subject: [PATCH] tree-copy: Never try to change files' ownership

Only root can do this. Updating libglnx has given us the ability to
skip that step, so do so.

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 pressure-vessel/tree-copy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pressure-vessel/tree-copy.c b/pressure-vessel/tree-copy.c
index 80b014442..5d56cb6a8 100644
--- a/pressure-vessel/tree-copy.c
+++ b/pressure-vessel/tree-copy.c
@@ -274,7 +274,7 @@ copy_tree_helper (const char *fpath,
          * fails too. */
         if (!glnx_file_copy_at (AT_FDCWD, fpath, sb,
                                 AT_FDCWD, dest,
-                                GLNX_FILE_COPY_OVERWRITE,
+                                GLNX_FILE_COPY_OVERWRITE | GLNX_FILE_COPY_NOCHOWN,
                                 NULL, error))
           {
             glnx_prefix_error (error, "Unable to copy \"%s\" to \"%s\"",
-- 
GitLab