cri: filter selinux xattr for image volumes
Exclude the `security.selinux` xattr when copying content from layer storage for image volumes. This allows for the already correct label at the target location to be applied to the copied content, thus enabling containers to write to volumes that they implicitly expect to be able to write to. - Fixes containerd/containerd#5090 - See rancher/rke2#690 Signed-off-by: Jacob Blain Christen <jacob@rancher.com>
This commit is contained in:
parent
ff2e58d114
commit
c3609ff4ca
@ -115,5 +115,5 @@ func copyExistingContents(source, destination string) error {
|
|||||||
if len(dstList) != 0 {
|
if len(dstList) != 0 {
|
||||||
return errors.Errorf("volume at %q is not initially empty", destination)
|
return errors.Errorf("volume at %q is not initially empty", destination)
|
||||||
}
|
}
|
||||||
return fs.CopyDir(destination, source)
|
return fs.CopyDir(destination, source, fs.WithXAttrExclude("security.selinux"))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user