Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1111088 > unrolled thread

Bug#1016103: lvm2: do not copy security attributes in initramfs hook

Started byChristian Göttsche <cgzones@googlemail.com>
First post2022-07-27 12:30 +0200
Last post2022-07-27 12:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.debian.bugs.dist


Contents

  Bug#1016103: lvm2: do not copy security attributes in initramfs hook Christian Göttsche <cgzones@googlemail.com> - 2022-07-27 12:30 +0200

#1111088 — Bug#1016103: lvm2: do not copy security attributes in initramfs hook

FromChristian Göttsche <cgzones@googlemail.com>
Date2022-07-27 12:30 +0200
SubjectBug#1016103: lvm2: do not copy security attributes in initramfs hook
Message-ID<ENMsF-e9xa-1@gated-at.bofh.it>
Package: lvm2
Version: 2.03.16-1
User: selinux-devel@lists.alioth.debian.org
Usertags: selinux

When copying files into the temporary working directory do not copy the
security context but use the default one for the target path.
Otherwise, e.g. when using SELinux, the context might not be allowed on
the destination filesystem and the process needs elevated access to the
original context.

(An alternative would be to use cp -dRp, which would be equivalent to
cp -a except not copying any extended attributes.)


diff --git a/debian/initramfs-tools/lvm2/hooks/lvm2
b/debian/initramfs-tools/lvm2/hooks/lvm2
index 6c186dc5a..f2588b625 100755
--- a/debian/initramfs-tools/lvm2/hooks/lvm2
+++ b/debian/initramfs-tools/lvm2/hooks/lvm2
@@ -16,7 +16,7 @@ esac

. /usr/share/initramfs-tools/hook-functions

-cp -a /etc/lvm/ ${DESTDIR}/etc/lvm/
+cp -aZ /etc/lvm/ ${DESTDIR}/etc/lvm/

mkdir -p $DESTDIR/lib/udev/rules.d/
for rules in 56-lvm.rules 69-lvm-metad.rules; do


See also https://salsa.debian.org/lvm-team/lvm2/-/merge_requests/3

[toc] | [standalone]


Back to top | Article view | linux.debian.bugs.dist


csiph-web