Bug 544187 - SELinux is preventing python (hplip_t) "read" to /var/lib/hp/hplip.state (var_lib_t).
Summary: SELinux is preventing python (hplip_t) "read" to /var/lib/hp/hplip.state (var...
Keywords:
Status: CLOSED DUPLICATE of bug 538428
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:5bf8c3db1f4...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-04 05:51 UTC by Morgan Olausson
Modified: 2010-02-02 10:08 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-12-04 11:09:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Morgan Olausson 2009-12-04 05:51:03 UTC
Summary:

SELinux is preventing python (hplip_t) "read" to /var/lib/hp/hplip.state
(var_lib_t).

Detailed Description:

SELinux denied access requested by python. /var/lib/hp/hplip.state may be a
mislabeled. /var/lib/hp/hplip.state default SELinux type is hplip_var_lib_t, but
its current type is var_lib_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/lib/hp/hplip.state', if this file is a
directory, you can recursively restore using restorecon -R
'/var/lib/hp/hplip.state'.

Fix Command:

restorecon '/var/lib/hp/hplip.state'

Additional Information:

Source Context                system_u:system_r:hplip_t:s0
Target Context                system_u:object_r:var_lib_t:s0
Target Objects                /var/lib/hp/hplip.state [ file ]
Source                        python
Source Path                   /usr/bin/python
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           python-2.6-9.fc11
Target RPM Packages           hplip-3.9.8-12.fc11
Policy RPM                    selinux-policy-3.6.12-86.fc11
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   restorecon
Host Name                     (removed)
Platform                      Linux (removed) 2.6.30.9-96.fc11.i686.PAE #1 SMP
                              Tue Nov 3 23:41:33 EST 2009 i686 i686
Alert Count                   9
First Seen                    Fri 06 Nov 2009 08:00:14 AM CET
Last Seen                     Mon 16 Nov 2009 03:07:29 PM CET
Local ID                      88d2def9-bea9-4292-8b0b-b4c6c8fa4778
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1258380449.278:23): avc:  denied  { read } for  pid=2846 comm="python" name="hplip.state" dev=dm-0 ino=139229 scontext=system_u:system_r:hplip_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1258380449.278:23): arch=40000003 syscall=5 success=no exit=-13 a0=9520320 a1=8000 a2=1b6 a3=957b918 items=0 ppid=2655 pid=2846 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="python" exe="/usr/bin/python" subj=system_u:system_r:hplip_t:s0 key=(null)



Hash String generated from  selinux-policy-3.6.12-86.fc11,restorecon,python,hplip_t,var_lib_t,file,read
audit2allow suggests:

#============= hplip_t ==============
allow hplip_t var_lib_t:file read;

Comment 1 Miroslav Grepl 2009-12-04 11:09:47 UTC

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


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