Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1585485

Summary: SELinux is preventing flock from 'lock' accesses on the Datei /run/tlp/lock_tlp.
Product: [Fedora] Fedora Reporter: Heiko Adams <bugzilla>
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, michael.scheiffler, plautrba, pmoore
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:f163b629b6908287aedde1e259e508f968b83e08bac4ce285f37fcceda37bff6;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-10 20:57:31 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 Heiko Adams 2018-06-03 13:15:28 UTC
Description of problem:
SELinux is preventing flock from 'lock' accesses on the Datei /run/tlp/lock_tlp.

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

If you believe that flock should be allowed lock access on the lock_tlp file 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 'flock' --raw | audit2allow -M my-flock
# semodule -X 300 -i my-flock.pp

Additional Information:
Source Context                system_u:system_r:tlp_t:s0
Target Context                system_u:object_r:var_run_t:s0
Target Objects                /run/tlp/lock_tlp [ file ]
Source                        flock
Source Path                   flock
Port                          <Unbekannt>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.1-30.fc28.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.16.13-300.fc28.x86_64 #1 SMP Wed
                              May 30 14:31:00 UTC 2018 x86_64 x86_64
Alert Count                   2
First Seen                    2018-06-03 10:30:57 CEST
Last Seen                     2018-06-03 13:55:45 CEST
Local ID                      60790b2a-e979-4a22-a9ac-bf59fcee7cc3

Raw Audit Messages
type=AVC msg=audit(1528026945.661:303): avc:  denied  { lock } for  pid=8253 comm="flock" path="/run/tlp/lock_tlp" dev="tmpfs" ino=32207 scontext=system_u:system_r:tlp_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=file permissive=0


Hash: flock,tlp_t,var_run_t,file,lock

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

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.5
hashmarkername: setroubleshoot
kernel:         4.16.13-300.fc28.x86_64
type:           libreport

Potential duplicate: bug 1406550

Comment 1 Lukas Vrabec 2018-06-10 20:57:31 UTC

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

Comment 2 Michael 2018-08-01 19:17:36 UTC
*** Bug 1610973 has been marked as a duplicate of this bug. ***