umoci: layer: Xattr unpack code is broken on Fedora/RHEL

just have a busybox image copied with skopeo to OCI format, then:

$ umoci unpack --image busybox bundle
INFO[0000] parsed mappings                               map.gid=[] map.uid=[]
FATA[0000] create runtime bundle: chown rootfs: lchown bundle/rootfs: operation not permitted

$ sudo $GOPATH/bin/umoci unpack --image busybox bundle
INFO[0000] parsed mappings                               map.gid=[] map.uid=[]
INFO[0000] unpack manifest: unpacking layer sha256:56bec22e355981d8ba0878c6c2f23b21f422f30ab0aba188b54f1ffeff59c190  diffid="sha256:e88b3f82283bc59d5e0df427c824e9f95557e661fcb0ea15fb0fb6f97760f9d9"
FATA[0000] create runtime bundle: unpack layer: unpack entry: bin: apply hdr metadata: clear xattr metadata: /home/amurdaca/go/src/github.com/docker/containerd/bundle/rootfs/bin: lclearxattrs: lremovexattr(/home/amurdaca/go/src/github.com/docker/containerd/bundle/rootfs/bin, security.selinux): permission denied

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 22 (15 by maintainers)

Commits related to this issue

Most upvoted comments

It probably does. I will try it out, but is there a nice environment I can use to test SELinux? Will a Fedora VM work out-of-the box with SELinux in enforcing mode?

I usually spin up fedora vms out of qcow2 images (fedora cloud images) and everything works great with Selinux and the rest