Bug 872642
| Summary: | libvirt should mount /sys/fs/kernel/security if present on the host | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Daniel Berrangé <berrange> | ||||
| Component: | libvirt | Assignee: | Daniel Berrangé <berrange> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 7.0 | CC: | ajia, cwei, dwalsh, dyuan, eblake, lsu, mzhan | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | libvirt-1.1.1-3.el7 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-06-13 13:15:53 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Daniel Berrangé
2012-11-02 16:12:55 UTC
Created attachment 639608 [details]
This patch causes /sys/kernel/security to be mounted within the container.
Can you also post the patch upstream to libvir-list, for faster review? Eric I was just waiting for Dan's Comment. Libvirt should mount /sys/fs/kernel/security if present on the host. Not sure I did this part correctly. IE Does he want us to only mount the file system if it is mounted on the host? Only if securefs exists? Patch sent upstream (In reply to comment #4) > Patch sent upstream commit aa696e1846c9ddfcc25654dc4ea8762df4fd38ab Author: Daniel J Walsh <dwalsh> Date: Fri Sep 28 14:11:43 2012 -0400 build: default selinuxfs mount point to /sys/fs/selinux Currently if you build on a machine that does not support SELinux we end up with the default mount point being /selinux, since this is moved to /sys/fs/selinux, we should start defaulting there. I believe this is causing a bug in libvirt-lxc when /selinux does not exists, even though /sys/fs/selinux exists. (In reply to comment #5) > (In reply to comment #4) > > Patch sent upstream > > commit aa696e1846c9ddfcc25654dc4ea8762df4fd38ab This is a internal patch on rhel7.0 branch. @alex you've got the wrong patch there I'm afraid - you've mixed /sys/fs/selinux with /sys/fs/security. (In reply to comment #7) > @alex you've got the wrong patch there I'm afraid - you've mixed > /sys/fs/selinux with /sys/fs/security. Aha, right, I haven't notice this, thanks for your friendly reminder :) In addition, I haven't found dwalsh's patch on upstream, or we haven't ack this patch? Merged upstream in
commit 6807238d87fd93dee30038bea1e8582a5f0a9fe7
Author: Dan Walsh <dwalsh>
Date: Thu Aug 8 12:51:01 2013 +0100
Ensure securityfs is mounted readonly in container
Verified with libvirt-1.1.1-16.el7.x86_64 Setup a container and start it #virt-sandbox-service create -u httpd.service myapache #virsh -c lxc:/// start myapache Enter it and check the mount status #virt-sandbox-service connect myapache sh4.2#cat /proc/mount | grep kernel securityfs /sys/kernel/security securityfs ro,relatime 0 0 The securityfs has mounted as read only This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |