Bug 1029659

Summary: systemd within a container attempts to unmount file systems that it did not mount
Product: [Fedora] Fedora Reporter: Daniel Walsh <dwalsh>
Component: systemdAssignee: systemd-maint
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: berrange, johannbg, lnykryn, msekleta, plautrba, systemd-maint, vpavlin, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-24 16:11:59 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:

Description Daniel Walsh 2013-11-12 21:05:38 UTC
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 16:31:06 UTC
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 16:11:59 UTC
Ok.  I can just add dontaudit.