This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1297340 - SELinux is preventing /usr/sbin/cupsd from 'read' accesses on the lnk_file /usr/lib64/
SELinux is preventing /usr/sbin/cupsd from 'read' accesses on the lnk_file /u...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
: 1297342 1297343 1297344 1297345 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2016-01-11 04:44 EST by edo
Modified: 2016-02-09 05:33 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-01-11 08:40:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description edo 2016-01-11 04:44:40 EST
Description of problem:
SELinux is preventing /usr/sbin/cupsd from 'read' accesses on the lnk_file /usr/lib64/

*****  Plugin restorecon (94.8 confidence) suggests   ************************

If you want to fix the label. 
/usr/lib64/ default label should be lib_t.
Then you can run restorecon.
# /sbin/restorecon -v /usr/lib64/

*****  Plugin catchall_labels (5.21 confidence) suggests   *******************

If you want to allow cupsd to have read access on the lnk_file
Then you need to change the label on /usr/lib64/
# semanage fcontext -a -t FILE_TYPE '/usr/lib64/'
where FILE_TYPE is one of the following: admin_home_t, bin_t, boot_t, cert_t, courier_exec_t, cupsd_etc_t, cupsd_exec_t, cupsd_var_lib_t, device_t, devlog_t, etc_runtime_t, etc_t, exim_exec_t, file_context_t, fonts_cache_t, fonts_t, ld_so_t, lib_t, locale_t, man_cache_t, man_t, net_conf_t, postfix_postdrop_t, print_spool_t, proc_t, readable_t, root_t, rpm_script_tmp_t, security_t, selinux_config_t, sendmail_exec_t, shell_exec_t, snmpd_var_lib_t, src_t, sssd_var_lib_t, sysfs_t, system_conf_t, system_db_t, textrel_shlib_t, tmp_t, udev_var_run_t, usbfs_t, usr_t, var_lock_t, var_run_t, var_t. 
Then execute: 
restorecon -v '/usr/lib64/'

*****  Plugin catchall (1.44 confidence) suggests   **************************

If you believe that cupsd should be allowed read access on the lnk_file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# grep cupsd /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:unlabeled_t:s0
Target Objects                /usr/lib64/ [ lnk_file ]
Source                        cupsd
Source Path                   /usr/sbin/cupsd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           cups-2.1.2-1.fc23.x86_64
Target RPM Packages           glibc-2.22-7.fc23.x86_64
Policy RPM                    selinux-policy-3.13.1-158.fc23.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.3.3-300.fc23.x86_64 #1 SMP Tue
                              Jan 5 23:31:01 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-01-11 09:21:32 CET
Last Seen                     2016-01-11 09:21:32 CET
Local ID                      d85353d3-bfc3-4b17-b0f9-a640afd129b3

Raw Audit Messages
type=AVC msg=audit(1452500492.102:556): avc:  denied  { read } for  pid=2702 comm="cupsd" name="" dev="dm-1" ino=3193829 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:unlabeled_t:s0 tclass=lnk_file permissive=1

type=SYSCALL msg=audit(1452500492.102:556): arch=x86_64 syscall=open success=yes exit=EINTR a0=7f6f951afe58 a1=80000 a2=7f6f95272148 a3=7f6f95267e48 items=0 ppid=1 pid=2702 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=cupsd exe=/usr/sbin/cupsd subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null)

Hash: cupsd,cupsd_t,unlabeled_t,lnk_file,read

Version-Release number of selected component:

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.3.3-300.fc23.x86_64
type:           libreport
Comment 1 Daniel Walsh 2016-01-11 08:40:18 EST
Looks like you have a labeling problem in /usr.


# restorecon -R -v /usr

Should fix it
Comment 2 Daniel Walsh 2016-01-11 08:40:42 EST
*** Bug 1297342 has been marked as a duplicate of this bug. ***
Comment 3 Daniel Walsh 2016-01-11 08:41:01 EST
*** Bug 1297343 has been marked as a duplicate of this bug. ***
Comment 4 Daniel Walsh 2016-01-11 08:41:23 EST
*** Bug 1297345 has been marked as a duplicate of this bug. ***
Comment 5 Miroslav Grepl 2016-01-11 08:45:30 EST
*** Bug 1297344 has been marked as a duplicate of this bug. ***
Comment 6 Miroslav Grepl 2016-01-11 08:47:21 EST
Did you upgrade? Or is it a fresh install?
Comment 7 edo 2016-01-12 04:42:02 EST
Upgrade from 22 to 23
Comment 8 Miroslav Grepl 2016-01-21 06:27:37 EST
(In reply to edo from comment #7)
> Upgrade from 22 to 23

Ok it was an upgrade issue. 

Did restorecon work for you?
Comment 9 edo 2016-02-09 05:33:34 EST
(In reply to Miroslav Grepl from comment #8)
> (In reply to edo from comment #7)
> > Upgrade from 22 to 23
> Ok it was an upgrade issue. 
> Did restorecon work for you?

Yes, it did. Now it`s OK.

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