Bug 862962

Summary: SELinux is preventing /usr/bin/python2.7 from 'getattr' accesses on the file /usr/lib/systemd/system/cups.service.
Product: [Fedora] Fedora Reporter: Tony <tony.baz>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:c5f14105fff951484197da88b18591e39ede32277c087207bac46e5cbff85f98
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-06 11:18:08 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:
Attachments:
Description Flags
File: type
none
File: hashmarkername none

Description Tony 2012-10-04 03:01:32 UTC
Description of problem:
When attempting to print to fax from Libreoffice Write on HP fax / printer C7280.
Happens every time I try to print to fax.


Additional info:
libreport version: 2.0.14
kernel:         3.5.4-2.fc17.x86_64

description:
:SELinux is preventing /usr/bin/python2.7 from 'getattr' accesses on the file /usr/lib/systemd/system/cups.service.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that python2.7 should be allowed getattr access on the cups.service file by default.
:Then you should report this as a bug.
:You can generate a local policy module to allow this access.
:Do
:allow this access for now by executing:
:# grep hpfax /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:hplip_t:s0-s0:c0.c1023
:Target Context                system_u:object_r:cupsd_unit_file_t:s0
:Target Objects                /usr/lib/systemd/system/cups.service [ file ]
:Source                        hpfax
:Source Path                   /usr/bin/python2.7
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           python-2.7.3-7.2.fc17.x86_64
:Target RPM Packages           cups-1.5.4-2.fc17.x86_64
:Policy RPM                    selinux-policy-3.10.0-149.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.5.4-2.fc17.x86_64 #1 SMP Wed Sep
:                              26 21:58:50 UTC 2012 x86_64 x86_64
:Alert Count                   2
:First Seen                    2012-10-04 13:56:41 NZDT
:Last Seen                     2012-10-04 14:58:38 NZDT
:Local ID                      1909914f-86e7-4945-a4c9-ed54d7af6dcf
:
:Raw Audit Messages
:type=AVC msg=audit(1349315918.222:66): avc:  denied  { getattr } for  pid=1602 comm="hpfax" path="/usr/lib/systemd/system/cups.service" dev="sda5" ino=414624 scontext=system_u:system_r:hplip_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cupsd_unit_file_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1349315918.222:66): arch=x86_64 syscall=stat success=no exit=EACCES a0=1889680 a1=7fff070f1150 a2=7fff070f1150 a3=20 items=0 ppid=698 pid=1602 auid=4294967295 uid=0 gid=7 euid=0 suid=0 fsuid=0 egid=7 sgid=7 fsgid=7 tty=(none) ses=4294967295 comm=hpfax exe=/usr/bin/python2.7 subj=system_u:system_r:hplip_t:s0-s0:c0.c1023 key=(null)
:
:Hash: hpfax,hplip_t,cupsd_unit_file_t,file,getattr
:
:audit2allow
:
:#============= hplip_t ==============
:#!!!! This avc is allowed in the current policy
:
:allow hplip_t cupsd_unit_file_t:file getattr;
:
:audit2allow -R
:
:#============= hplip_t ==============
:#!!!! This avc is allowed in the current policy
:
:allow hplip_t cupsd_unit_file_t:file getattr;
:

Comment 1 Tony 2012-10-04 03:01:35 UTC
Created attachment 621300 [details]
File: type

Comment 2 Tony 2012-10-04 03:01:37 UTC
Created attachment 621301 [details]
File: hashmarkername

Comment 3 Daniel Walsh 2012-10-06 11:18:08 UTC
According to the alert, this problem has already been fixed on your machine.

Comment 4 Tony 2012-10-06 20:37:32 UTC
Yes I added a local policy module for this one and then it got blocked for another reason. So I changed selinux to permissive and it chucked out 10 errors which I've reported as bugs. Question, can I have multiple local policy exceptions?

Comment 5 Miroslav Grepl 2012-10-08 08:58:40 UTC
Has been added to F17.

commit 7162296fc6cfa59dc12bb48d62ccd45120244080
Author: Miroslav Grepl <mgrepl>
Date:   Mon Oct 8 09:46:59 2012 +0200

    Access needed to allow hplip to send faxes