Bug 1557350

Summary: SELinux is preventing dnf from using the 'mac_admin' capabilities.
Product: [Fedora] Fedora Reporter: Jonathan Haas <jonha87>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: dwalsh, lvrabec, mgrepl, plautrba, pmoore, sgallagh
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:af406c01e613a5ffcdad7f813a3e80916b688c0f6ccdf30f87cf7254b223b8a8;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-23 14:12:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jonathan Haas 2018-03-16 13:15:54 UTC
Description of problem:
running dnf upgrade
SELinux is preventing dnf from using the 'mac_admin' capabilities.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that dnf should have the mac_admin capability by default.
Then sie sollten dies als Fehler melden.
Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen.
Do
allow this access for now by executing:
# ausearch -c 'dnf' --raw | audit2allow -M my-dnf
# semodule -X 300 -i my-dnf.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Objects                Unknown [ capability2 ]
Source                        dnf
Source Path                   dnf
Port                          <Unbekannt>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.1-13.fc28.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.16.0-0.rc5.git0.1.fc28.x86_64 #1
                              SMP Mon Mar 12 20:10:40 UTC 2018 x86_64 x86_64
Alert Count                   1
First Seen                    2018-03-16 14:14:17 CET
Last Seen                     2018-03-16 14:14:17 CET
Local ID                      2322f7a9-222e-479e-9b37-c232b04f7836

Raw Audit Messages
type=AVC msg=audit(1521206057.878:398): avc:  denied  { mac_admin } for  pid=24431 comm="dnf" capability=33  scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=capability2 permissive=0


Hash: dnf,unconfined_t,unconfined_t,capability2,mac_admin

Version-Release number of selected component:
selinux-policy-3.14.1-13.fc28.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.3
hashmarkername: setroubleshoot
kernel:         4.16.0-0.rc5.git0.1.fc28.x86_64
type:           libreport

Comment 1 Stephen Gallagher 2018-03-20 15:22:57 UTC
Description of problem:
While updating docker from docker-2:1.13.1-44.git584d391.fc27.x86_64 to docker-2:1.13.1-47.gitf43d177.fc28.x86_64, I experienced an SELinux denial during an early (%pre or %pretrans) scriptlet which blocked the update.

Version-Release number of selected component:
selinux-policy-3.14.1-14.fc28.noarch

Additional info:
reporter:       libreport-2.9.3
hashmarkername: setroubleshoot
kernel:         4.16.0-0.rc4.git0.1.fc28.x86_64
type:           libreport

Comment 2 Lukas Vrabec 2018-03-23 14:12:29 UTC

*** This bug has been marked as a duplicate of bug 1557275 ***