Bug 562562 - SELinux is preventing cupsd (cupsd_t) "unlink" to /var/run/cups/certs/0 (var_lock_t).
Summary: SELinux is preventing cupsd (cupsd_t) "unlink" to /var/run/cups/certs/0 (var_...
Keywords:
Status: CLOSED DUPLICATE of bug 562345
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:c08a0f6d7f1...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-02-07 12:26 UTC by paulfgodbold
Modified: 2010-02-08 08:56 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2010-02-08 08:56:30 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description paulfgodbold 2010-02-07 12:26:59 UTC
Summary:

SELinux is preventing cupsd (cupsd_t) "unlink" to /var/run/cups/certs/0
(var_lock_t).

Detailed Description:

SELinux denied access requested by cupsd. /var/run/cups/certs/0 may be a
mislabeled. /var/run/cups/certs/0 default SELinux type is cupsd_var_run_t, but
its current type is var_lock_t. Changing this file back to the default type, may
fix your problem.

File contexts can be assigned to a file in the following ways.

  * Files created in a directory receive the file context of the parent
    directory by default.
  * The SELinux policy might override the default label inherited from the
    parent directory by specifying a process running in context A which creates
    a file in a directory labeled B will instead create the file with label C.
    An example of this would be the dhcp client running with the dhclient_t type
    and creates a file in the directory /etc. This file would normally receive
    the etc_t type due to parental inheritance but instead the file is labeled
    with the net_conf_t type because the SELinux policy specifies this.
  * Users can change the file context on a file using tools such as chcon, or
    restorecon.

This file could have been mislabeled either by user error, or if an normally
confined application was run under the wrong domain.

However, this might also indicate a bug in SELinux because the file should not
have been labeled with this type.

If you believe this is a bug, please file a bug report
(http://bugzilla.redhat.com/bugzilla/enter_bug.cgi) against this package.

Allowing Access:

You can restore the default system context to this file by executing the
restorecon command. restorecon '/var/run/cups/certs/0', if this file is a
directory, you can recursively restore using restorecon -R
'/var/run/cups/certs/0'.

Fix Command:

restorecon '/var/run/cups/certs/0'

Additional Information:

Source Context                system_u:system_r:cupsd_t:s0-s0:c0.c1023
Target Context                system_u:object_r:var_lock_t:s0
Target Objects                /var/run/cups/certs/0 [ file ]
Source                        cupsd
Source Path                   /usr/sbin/cupsd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           cups-1.4-0.b2.18.fc11
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.12-62.fc11
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   restorecon
Host Name                     (removed)
Platform                      Linux (removed) 2.6.29.5-191.fc11.i586 #1 SMP Tue Jun
                              16 23:11:39 EDT 2009 i686 i686
Alert Count                   13
First Seen                    Tue 14 Jul 2009 09:17:46 PM BST
Last Seen                     Tue 14 Jul 2009 09:18:15 PM BST
Local ID                      a1dba02b-a434-4203-b49c-9f2da1f1d793
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1247602695.796:26): avc:  denied  { unlink } for  pid=1301 comm="cupsd" name="0" dev=dm-0 ino=5393 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_lock_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1247602695.796:26): arch=40000003 syscall=10 success=no exit=-13 a0=bfe0d18c a1=bfe0d010 a2=ba4ff4 a3=20 items=0 ppid=1 pid=1301 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 String generated from  selinux-policy-3.6.12-62.fc11,restorecon,cupsd,cupsd_t,var_lock_t,file,unlink
audit2allow suggests:

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

Comment 1 Miroslav Grepl 2010-02-08 08:56:30 UTC

*** This bug has been marked as a duplicate of bug 562345 ***


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