Bug 1311759

Summary: Denials when amanda_t calls mtx
Product: [Fedora] Fedora Reporter: Jason Tibbitts <j>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 23CC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: selinux-policy-3.13.1-158.8.fc23 selinux-policy-3.13.1-158.9.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-05 06:23:09 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:

Description Jason Tibbitts 2016-02-24 22:23:26 UTC
When running amrecover (part of the amanda package) as root to restore some files, I find that the amanda cannot manipulate the tape changer to load the necessary tapes.  I switched to permissive and retried; here are the logged AVCs:

time->Wed Feb 24 16:18:53 2016
type=AVC msg=audit(1456352333.877:1085): avc:  denied  { read write } for  pid=11898 comm="mtx" name="sg8" dev="devtmpfs" ino=12562 scontext=system_u:system_r:amanda_t:s0 tcontext=system_u:object_r:scsi_generic_device_t:s0 tclass=chr_file permissive=1
----
time->Wed Feb 24 16:18:53 2016
type=AVC msg=audit(1456352333.877:1086): avc:  denied  { open } for  pid=11898 comm="mtx" path="/dev/sg8" dev="devtmpfs" ino=12562 scontext=system_u:system_r:amanda_t:s0 tcontext=system_u:object_r:scsi_generic_device_t:s0 tclass=chr_file permissive=1
----
time->Wed Feb 24 16:18:53 2016
type=AVC msg=audit(1456352333.877:1087): avc:  denied  { ioctl } for  pid=11898 comm="mtx" path="/dev/sg8" dev="devtmpfs" ino=12562 ioctlcmd=2282 scontext=system_u:system_r:amanda_t:s0 tcontext=system_u:object_r:scsi_generic_device_t:s0 tclass=chr_file permissive=1

In enforcing mode, I just see the first AVC.

Comment 1 Lukas Vrabec 2016-02-25 15:38:18 UTC
commit 98b375cdd6910c626c899581f12e3802632054da
Author: Lukas Vrabec <lvrabec>
Date:   Thu Feb 25 16:37:17 2016 +0100

    Allow amanda to manipulate the tape changer to load the necessary tapes. rhbz#1311759

Comment 2 Fedora Update System 2016-02-27 13:50:48 UTC
selinux-policy-3.13.1-158.9.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-ffbae3a870

Comment 3 Fedora Update System 2016-02-28 13:54:36 UTC
selinux-policy-3.13.1-158.9.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-ffbae3a870

Comment 4 Fedora Update System 2016-03-05 06:22:17 UTC
selinux-policy-3.13.1-158.9.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.