Bug 970076 - SELinux is preventing /usr/bin/python2.7 from 'unlink' accesses on the file hplip_config_usb_printer.log.
Summary: SELinux is preventing /usr/bin/python2.7 from 'unlink' accesses on the file h...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:b7118efdb71689f1eb6bfcae250...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-03 12:30 UTC by Antonio Guzmán Simón
Modified: 2013-06-04 13:56 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-06-04 13:56:17 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Antonio Guzmán Simón 2013-06-03 12:30:43 UTC
Description of problem:
SELinux is preventing /usr/bin/python2.7 from 'unlink' accesses on the file hplip_config_usb_printer.log.

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

If cree que de manera predeterminada, python2.7 debería permitir acceso unlink sobre  hplip_config_usb_printer.log file.     
Then debería reportar esto como un error.
Puede generar un módulo de política local para permitir este acceso.
Do
permita el acceso momentáneamente executando:
# grep hp-config_usb_p /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:var_log_t:s0
Target Objects                hplip_config_usb_printer.log [ file ]
Source                        hp-config_usb_p
Source Path                   /usr/bin/python2.7
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           python-2.7.3-13.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-97.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.4-200.fc18.x86_64 #1 SMP Fri
                              May 24 20:10:49 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-06-03 14:25:19 CEST
Last Seen                     2013-06-03 14:25:19 CEST
Local ID                      bfc3f04c-cc0d-44b1-a4d2-6e584dce3ae7

Raw Audit Messages
type=AVC msg=audit(1370262319.769:2005): avc:  denied  { unlink } for  pid=10827 comm="hp-config_usb_p" name="hplip_config_usb_printer.log" dev="dm-1" ino=2496465 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_log_t:s0 tclass=file


type=SYSCALL msg=audit(1370262319.769:2005): arch=x86_64 syscall=unlink success=no exit=EACCES a0=1285e70 a1=1 a2=353d9b3a08 a3=7265746e6972705f items=0 ppid=1 pid=10827 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=hp-config_usb_p exe=/usr/bin/python2.7 subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null)

Hash: hp-config_usb_p,cupsd_t,var_log_t,file,unlink

audit2allow

#============= cupsd_t ==============
allow cupsd_t var_log_t:file unlink;

audit2allow -R
require {
	type cupsd_t;
}

#============= cupsd_t ==============
logging_delete_generic_logs(cupsd_t)


Additional info:
reporter:       libreport-2.1.4
hashmarkername: setroubleshoot
kernel:         3.9.4-200.fc18.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2013-06-04 13:56:17 UTC
Does 

# restorecon -R -v /var/log/hp

fix it?


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