Bug 570782 - cups-pdf fails if /home is nfs mounted by autofs
Summary: cups-pdf fails if /home is nfs mounted by autofs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-05 11:59 UTC by Andrea Dell'Amico
Modified: 2020-05-12 14:54 UTC (History)
2 users (show)

Fixed In Version: selinux-policy-3.6.32-99.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-12 04:24:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Andrea Dell'Amico 2010-03-05 11:59:09 UTC
Description of problem:

cups-pdf fails if /home is nfs mounted by autofs

Version-Release number of selected component (if applicable):
selinux-policy-3.6.32-92.fc12.noarch

How reproducible:

Always

Steps to Reproduce:

log in your workstation that has /home managed by autofs

Actual results:

cups-pdf fails to access /home

Expected results:

document printed as pdf in $HOME/Desktop

Additional info: The sealert report summary

Summary:

SELinux is preventing /usr/lib/cups/backend/cups-pdf "search" access to /home.

Detailed Description:

SELinux denied access requested by cups-pdf. /home may be a mislabeled. /home
default SELinux type is home_root_t, but its current type is autofs_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 creating 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 against this package.

Allowing Access:

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

Fix Command:

/sbin/restorecon '/home'

Additional Information:

Source Context                system_u:system_r:cups_pdf_t:s0-s0:c0.c1023
Target Context                system_u:object_r:autofs_t:s0
Target Objects                /home [ dir ]
Source                        cups-pdf
Source Path                   /usr/lib/cups/backend/cups-pdf
Port                          <Unknown>
Host                          localhost
Source RPM Packages           cups-pdf-2.5.0-3.fc12
Target RPM Packages           filesystem-2.4.30-2.fc12
Policy RPM                    selinux-policy-3.6.32-92.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   restorecon
Host Name                     corallo-ws
Platform                      Linux localhost 2.6.31.12-174.2.22.fc12.i686.PAE
                              #1 SMP Fri Feb 19 19:10:04 UTC 2010 i686 i686
Alert Count                   3
First Seen                    Fri Mar  5 12:49:00 2010
Last Seen                     Fri Mar  5 12:49:00 2010
Local ID                      c79ec301-afed-4396-847c-a7dcc1d8adba
Line Numbers                  

Raw Audit Messages            

node=corallo-ws type=AVC msg=audit(1267789740.553:99938): avc:  denied  { search } for  pid=8695 comm="cups-pdf" name="/" dev=autofs ino=11483 scontext=system_u:system_r:cups_pdf_t:s0-s0:c0.c1023 tcontext=system_u:object_r:autofs_t:s0 tclass=dir

node=corallo-ws type=SYSCALL msg=audit(1267789740.553:99938): arch=40000003 syscall=195 success=no exit=-13 a0=9b960a0 a1=bfa02f8c a2=515ff4 a3=3 items=0 ppid=1338 pid=8695 auid=4294967295 uid=0 gid=7 euid=0 suid=0 fsuid=0 egid=7 sgid=7 fsgid=7 tty=(none) ses=4294967295 comm="cups-pdf" exe="/usr/lib/cups/backend/cups-pdf" subj=system_u:system_r:cups_pdf_t:s0-s0:c0.c1023 key=(null)

Comment 1 Daniel Walsh 2010-03-05 14:15:51 UTC
Miroslav,

Add

	fs_search_auto_mountpoints(cups_pdf_t)

Comment 2 Miroslav Grepl 2010-03-05 15:33:25 UTC
Fixed in selinux-policy-3.6.32-98.fc12

Comment 3 Fedora Update System 2010-03-05 16:54:45 UTC
selinux-policy-3.6.32-99.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-99.fc12

Comment 4 Fedora Update System 2010-03-09 03:21:49 UTC
selinux-policy-3.6.32-99.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-99.fc12

Comment 5 Fedora Update System 2010-03-12 04:23:14 UTC
selinux-policy-3.6.32-99.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.


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