Bug 994994 - SELinux is preventing /usr/bin/python2.7 from 'open' accesses on the file /var/lib/rpm/.dbenv.lock.
SELinux is preventing /usr/bin/python2.7 from 'open' accesses on the file /va...
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: hplip (Show other bugs)
19
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tim Waugh
Fedora Extras Quality Assurance
abrt_hash:a758b42306b8e4c460c451e522c...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-08 07:17 EDT by Kapoios Kanenas
Modified: 2013-09-24 07:47 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-24 07:47:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Kapoios Kanenas 2013-08-08 07:17:22 EDT
Description of problem:
Trying to send a fax with hplip.

 hp-sendfax -n -fXXXX Documents/afile.pdf
SELinux is preventing /usr/bin/python2.7 from 'open' accesses on the file /var/lib/rpm/.dbenv.lock.

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

If you believe that python2.7 should be allowed open access on the .dbenv.lock 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:cupsd_t:s0-s0:c0.c1023
Target Context                system_u:object_r:rpm_var_lib_t:s0
Target Objects                /var/lib/rpm/.dbenv.lock [ file ]
Source                        hpfax
Source Path                   /usr/bin/python2.7
Port                          <Άγνωστο>
Host                          (removed)
Source RPM Packages           python-2.7.5-3.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-69.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.10.4-300.fc19.x86_64 #1 SMP Tue
                              Jul 30 11:29:05 UTC 2013 x86_64 x86_64
Alert Count                   5
First Seen                    2013-08-07 01:02:15 CEST
Last Seen                     2013-08-08 13:13:39 CEST
Local ID                      458788e3-bc0b-464f-986b-48a2a6035ab8

Raw Audit Messages
type=AVC msg=audit(1375960419.568:2742): avc:  denied  { open } for  pid=23443 comm="hpfax" path="/var/lib/rpm/.dbenv.lock" dev="sda3" ino=4194418 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:rpm_var_lib_t:s0 tclass=file


type=SYSCALL msg=audit(1375960419.568:2742): arch=x86_64 syscall=open success=yes exit=ENOEXEC a0=13a1380 a1=42 a2=1a4 a3=0 items=0 ppid=1850 pid=23443 auid=4294967295 uid=0 gid=7 euid=0 suid=0 fsuid=0 egid=7 sgid=7 fsgid=7 ses=4294967295 tty=(none) comm=hpfax exe=/usr/bin/python2.7 subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null)

Hash: hpfax,cupsd_t,rpm_var_lib_t,file,open

Additional info:
reporter:       libreport-2.1.6
hashmarkername: setroubleshoot
kernel:         3.10.4-300.fc19.x86_64
type:           libreport
Comment 1 Miroslav Grepl 2013-08-08 09:11:26 EDT
Did you need to switch to permissive mode?
Comment 2 Kapoios Kanenas 2013-08-16 09:16:37 EDT
No I didn't. Though I added the rule(s) generated by audit2allow but still didn't work.
Comment 3 Daniel Walsh 2013-08-16 13:43:16 EDT
Any idea why hpfax would be reading the rpm database?
Comment 4 Tim Waugh 2013-08-20 10:31:43 EDT
No, none. There is some code to do that (installer/core_install.py can run yum) but I can't see how hpfax could end up there.
Comment 5 Daniel Walsh 2013-08-28 13:26:53 EDT
Well Kapoios is this still happening?  I would not modify your policy with audit2allow.  This should not be needed.
Comment 6 Kapoios Kanenas 2013-09-23 16:46:25 EDT
No. I can't reproduce this issue anymore.

Note You need to log in before you can comment on or make changes to this bug.