Bug 979843 - SELinux is preventing /usr/bin/gs from 'create' accesses on the file _______.pdf.
SELinux is preventing /usr/bin/gs from 'create' accesses on the file _______....
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
18
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:7fc2013cdb2ca86fbe924bc2ba6...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-30 22:01 EDT by Desktop7.org
Modified: 2013-08-14 22:54 EDT (History)
3 users (show)

See Also:
Fixed In Version: selinux-policy-3.11.1-100.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-14 22:54:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Desktop7.org 2013-06-30 22:01:09 EDT
Description of problem:
SELinux is preventing /usr/bin/gs from 'create' accesses on the file _______.pdf.

*****  Plugin catchall (100. confidence) suggests  ***************************

If 您認為 gs 就預設值應擁有 _______.pdf file 的 create 存取權。
Then 您應將此回報為錯誤。
您可產生本機模組,以允許這項存取。
Do
現在透過執行以下指令來允許此存取:
# grep gs /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:cups_pdf_t:s0-s0:c0.c1023
Target Context                system_u:object_r:user_home_dir_t:s0
Target Objects                _______.pdf [ file ]
Source                        gs
Source Path                   /usr/bin/gs
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           ghostscript-9.06-4.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-97.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.6-200.fc18.x86_64 #1 SMP Thu
                              Jun 13 18:56:55 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-07-01 10:00:25 CST
Last Seen                     2013-07-01 10:00:25 CST
Local ID                      539b4566-f6a0-4350-9a6e-4772593bcec3

Raw Audit Messages
type=AVC msg=audit(1372644025.49:2205): avc:  denied  { create } for  pid=10509 comm="gs" name="_______.pdf" scontext=system_u:system_r:cups_pdf_t:s0-s0:c0.c1023 tcontext=system_u:object_r:user_home_dir_t:s0 tclass=file


type=SYSCALL msg=audit(1372644025.49:2205): arch=x86_64 syscall=open success=no exit=EACCES a0=1075fc0 a1=242 a2=1b6 a3=238 items=0 ppid=10508 pid=10509 auid=4294967295 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 ses=4294967295 tty=(none) comm=gs exe=/usr/bin/gs subj=system_u:system_r:cups_pdf_t:s0-s0:c0.c1023 key=(null)

Hash: gs,cups_pdf_t,user_home_dir_t,file,create

audit2allow

#============= cups_pdf_t ==============
allow cups_pdf_t user_home_dir_t:file create;

audit2allow -R
require {
	type user_home_dir_t;
	type cups_pdf_t;
	class file create;
}

#============= cups_pdf_t ==============
allow cups_pdf_t user_home_dir_t:file create;


Additional info:
reporter:       libreport-2.1.4
hashmarkername: setroubleshoot
kernel:         3.9.6-200.fc18.x86_64
type:           libreport
Comment 1 Daniel Walsh 2013-07-01 06:55:35 EDT
Very strange, you should not have gotten this avc

   type_transition cups_pdf_t user_home_dir_t : file user_home_t;  

Since we have these rules in policy.

This says that if cups_pdf_t tries to create a file in a directory labeled user_home_dir_t, it will get created as user_home_t.

At least in F19.

Miroslav are we missing these rules in F18?
Comment 2 Miroslav Grepl 2013-07-01 07:13:53 EDT
There was a different trans rule. Fixed.

commit e707287d4ed97078582704d3e04e2445409d1c0f
Author: Miroslav Grepl <mgrepl@redhat.com>
Date:   Mon Jul 1 13:13:05 2013 +0200

    Allow cups_pdf_t to create home content
Comment 3 Fedora Update System 2013-08-05 01:40:58 EDT
selinux-policy-3.11.1-99.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-99.fc18
Comment 4 Fedora Update System 2013-08-05 20:14:32 EDT
Package selinux-policy-3.11.1-99.fc18:
* should fix your issue,
* was pushed to the Fedora 18 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.11.1-99.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-14256/selinux-policy-3.11.1-99.fc18
then log in and leave karma (feedback).
Comment 5 Fedora Update System 2013-08-07 07:12:26 EDT
selinux-policy-3.11.1-100.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-100.fc18
Comment 6 Fedora Update System 2013-08-14 22:54:01 EDT
selinux-policy-3.11.1-100.fc18 has been pushed to the Fedora 18 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.