Bug 1029659 - systemd within a container attempts to unmount file systems that it did not mount
systemd within a container attempts to unmount file systems that it did not m...
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-11-12 16:05 EST by Daniel Walsh
Modified: 2014-02-24 11:11 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-02-24 11:11:59 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Daniel Walsh 2013-11-12 16:05:38 EST
When running virt-sandbox-service.

If I run a virsh -c lxc:/// destroy

I see avc messages that say we need the following rules.

allow svirt_lxc_net_t fs_t:filesystem unmount;
allow svirt_lxc_net_t fusefs_t:filesystem unmount;
allow svirt_lxc_net_t svirt_sandbox_file_t:filesystem unmount;

type=SYSCALL msg=audit(11/12/2013 14:48:19.997:1062) : arch=x86_64 syscall=umount2 success=no exit=-13(Permission denied) a0=0x7fe23a4daab0 a1=0x0 a2=0x1 a3=0x7fff7a461570 items=0 ppid=1 pid=18514 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=umount exe=/usr/bin/umount subj=system_u:system_r:svirt_lxc_net_t:s0 key=(null) 
type=AVC msg=audit(11/12/2013 14:48:19.997:1062) : avc:  denied  { unmount } for  pid=18514 comm=umount scontext=system_u:system_r:svirt_lxc_net_t:s0 tcontext=system_u:object_r:fs_t:s0 tclass=filesystem 

For example.

It looks like systemd tries to umount everything.
Comment 1 Lennart Poettering 2014-02-23 11:31:06 EST
And I am pretty sure that's the correct way to handle this actually... We unmount everything we can unmount when going down.
Comment 2 Daniel Walsh 2014-02-24 11:11:59 EST
Ok.  I can just add dontaudit.

Note You need to log in before you can comment on or make changes to this bug.