From 6e69ff08c190296aae1590d9170e4f23291c7aff Mon Sep 17 00:00:00 2001 From: HuijingHei Date: Thu, 31 Oct 2024 19:00:02 +0800 Subject: [PATCH] deploy: make sure the file/dir xattr matches the target xref to https://github.com/coreos/fedora-coreos-tracker/issues/1808 PR https://github.com/ostreedev/ostree/pull/3323 fixes the new deployment, but keep the incorrect selinux label for the old deplyment. --- src/libostree/ostree-sysroot-deploy.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c index 43f380f68c..1245ac4aca 100644 --- a/src/libostree/ostree-sysroot-deploy.c +++ b/src/libostree/ostree-sysroot-deploy.c @@ -306,6 +306,14 @@ copy_dir_recurse (int src_parent_dfd, int dest_parent_dfd, const char *name, copy_flags, cancellable, error)) return glnx_prefix_error (error, "Copying attributes of %s", name); + { + g_autoptr (GVariant) xattrs = NULL; + if (!glnx_fd_get_all_xattrs (dest_parent_dfd, &xattrs, cancellable, error)) + return FALSE; + if (!glnx_fd_set_all_xattrs (dest_dfd, xattrs, cancellable, error)) + return FALSE; + } + while (TRUE) { struct stat child_stbuf;