Bug 838210

Summary: SELinux is preventing /usr/bin/brprintconf_dcpj525w from 'remove_name' accesses on the directory /opt/brother/Printers/dcpj525w/inf/brdcpj525wrc.
Product: [Fedora] Fedora Reporter: ben <know1>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA 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:38e2268bc31ce1e9e9abc53aff5d16d68467848a27235eb63c2d66b8e0cc7085
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-21 22:51:48 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 ben 2012-07-07 08:07:42 UTC
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.4.4-3
time:           Sat 07 Jul 2012 08:51:39 AM BST

description:
:SELinux is preventing /usr/bin/brprintconf_dcpj525w from 'remove_name' accesses on the directory /opt/brother/Printers/dcpj525w/inf/brdcpj525wrc.
:
:*****  Plugin catchall_labels (83.8 confidence) suggests  ********************
:
:If you want to allow brprintconf_dcpj525w to have remove_name access on the brdcpj525wrc directory
:Then you need to change the label on /opt/brother/Printers/dcpj525w/inf/brdcpj525wrc
:Do
:# semanage fcontext -a -t FILE_TYPE '/opt/brother/Printers/dcpj525w/inf/brdcpj525wrc'
:where FILE_TYPE is one of the following: var_log_t, var_run_t, cupsd_var_run_t, pcscd_var_run_t, print_spool_t, krb5_host_rcache_t, cupsd_interface_t, var_lock_t, tmp_t, var_t, cupsd_rw_etc_t, cupsd_etc_t, cupsd_log_t, cupsd_tmp_t, root_t, krb5_host_rcache_t, tmp_t. 
:Then execute: 
:restorecon -v '/opt/brother/Printers/dcpj525w/inf/brdcpj525wrc'
:
:
:*****  Plugin catchall (17.1 confidence) suggests  ***************************
:
:If you believe that brprintconf_dcpj525w should be allowed remove_name access on the brdcpj525wrc directory 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 brprintconf_dcp /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:usr_t:s0
:Target Objects                /opt/brother/Printers/dcpj525w/inf/brdcpj525wrc [
:                              dir ]
:Source                        brprintconf_dcp
:Source Path                   /usr/bin/brprintconf_dcpj525w
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           dcpj525wlpr-1.1.2-1.i386
:Target RPM Packages           dcpj525wlpr-1.1.2-1.i386
:Policy RPM                    selinux-policy-3.10.0-134.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.4.4-3 #1 SMP Sun Jul
:                              1 15:28:11 BST 2012 x86_64 x86_64
:Alert Count                   72
:First Seen                    Sat 07 Jul 2012 08:47:11 AM BST
:Last Seen                     Sat 07 Jul 2012 08:51:09 AM BST
:Local ID                      394963e2-ae59-4875-81a8-e86a125407b7
:
:Raw Audit Messages
:type=AVC msg=audit(1341647469.321:20664): avc:  denied  { remove_name } for  pid=21160 comm="brprintconf_dcp" name="brdcpj525wrc" dev="sdb13" ino=260131 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:usr_t:s0 tclass=dir
:
:
:type=SYSCALL msg=audit(1341647469.321:20664): arch=i386 syscall=setitimer per=400000 success=no exit=EACCES a0=ffdef710 a1=ffdef300 a2=804b3a0 a3=ffdef710 items=0 ppid=21140 pid=21160 auid=4294967295 uid=4 gid=7 euid=4 suid=4 fsuid=4 egid=7 sgid=7 fsgid=7 tty=(none) ses=4294967295 comm=brprintconf_dcp exe=/usr/bin/brprintconf_dcpj525w subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null)
:
:Hash: brprintconf_dcp,cupsd_t,usr_t,dir,remove_name
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:

Comment 1 Miroslav Grepl 2012-07-09 08:11:14 UTC
Execute

# chcon -R -t cupsd_rw_etc_t /opt/brother/Printers/dcpj525w/inf

will fix.

Comment 2 Fedora Update System 2012-07-18 13:04:36 UTC
selinux-policy-3.10.0-140.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-140.fc17

Comment 3 Fedora Update System 2012-07-19 09:11:30 UTC
Package selinux-policy-3.10.0-140.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-140.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-10840/selinux-policy-3.10.0-140.fc17
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2012-07-21 22:51:48 UTC
selinux-policy-3.10.0-140.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.