From aabc02341d88d6ceedf08192b198743850521e8f Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 11 Sep 2017 17:44:51 -0400 Subject: [PATCH] libpriv/passwd: Use GLNX_FILE_COPY_NOXATTRS Prep for unified core work. This was failing due to a bug in libglnx but I think this change is also correct. There's no good reason for us to copy xattrs like the SELinux label here - rather we want the labels to be reset during commit. --- src/libpriv/rpmostree-passwd-util.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/libpriv/rpmostree-passwd-util.c b/src/libpriv/rpmostree-passwd-util.c index 5e86b0baa4..f8bd2d4eee 100644 --- a/src/libpriv/rpmostree-passwd-util.c +++ b/src/libpriv/rpmostree-passwd-util.c @@ -1097,7 +1097,9 @@ rpmostree_passwd_prepare_rpm_layering (int rootfs_dfd, /* Copy /usr/lib/{passwd,group} -> /usr/etc (breaking hardlinks) */ if (!glnx_file_copy_at (rootfs_dfd, usrlibfile, NULL, - rootfs_dfd, usretcfile, 0, cancellable, error)) + rootfs_dfd, usretcfile, + GLNX_FILE_COPY_NOXATTRS, + cancellable, error)) return FALSE; /* Copy the merge's passwd/group to usr/lib (breaking hardlinks) */ @@ -1106,7 +1108,8 @@ rpmostree_passwd_prepare_rpm_layering (int rootfs_dfd, if (!glnx_file_copy_at (AT_FDCWD, glnx_strjoina (merge_passwd_dir, "/", file), NULL, rootfs_dfd, usrlibfiletmp, - GLNX_FILE_COPY_OVERWRITE, cancellable, error)) + GLNX_FILE_COPY_OVERWRITE | GLNX_FILE_COPY_NOXATTRS, + cancellable, error)) return FALSE; if (!glnx_renameat (rootfs_dfd, usrlibfiletmp, rootfs_dfd, usrlibfile, error)) @@ -1132,7 +1135,8 @@ rpmostree_passwd_prepare_rpm_layering (int rootfs_dfd, } if (!glnx_file_copy_at (rootfs_dfd, src, NULL, - rootfs_dfd, tmp, GLNX_FILE_COPY_OVERWRITE, + rootfs_dfd, tmp, + GLNX_FILE_COPY_OVERWRITE | GLNX_FILE_COPY_NOXATTRS, cancellable, error)) return FALSE; if (!glnx_renameat (rootfs_dfd, tmp, rootfs_dfd, src, error))