Bug 703445 - SELinux is preventing /usr/bin/gedit from 'open' accesses on the file /etc/hosts.
Summary: SELinux is preventing /usr/bin/gedit from 'open' accesses on the file /etc/ho...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 14
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:703c91b15f9...
: 703444 703447 703448 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-10 10:57 UTC by Hicham HAOUARI
Modified: 2011-05-10 11:47 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-10 11:47:46 UTC
Type: ---


Attachments (Terms of Use)

Description Hicham HAOUARI 2011-05-10 10:57:48 UTC
SELinux is preventing /usr/bin/gedit from 'open' accesses on the file /etc/hosts.

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

If you believe that gedit should be allowed open access on the hosts file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep gedit /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:sandbox_t:s0:c729,c816
Target Context                system_u:object_r:net_conf_t:s0
Target Objects                /etc/hosts [ file ]
Source                        gedit
Source Path                   /usr/bin/gedit
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           gedit-2.30.4-1.fc14
Target RPM Packages           setup-2.8.28-1.fc14
Policy RPM                    selinux-policy-3.9.7-31.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.11-83.fc14.i686
                              #1 SMP Mon Feb 7 07:04:18 UTC 2011 i686 i686
Alert Count                   4
First Seen                    Wed 02 Mar 2011 01:08:08 AM WET
Last Seen                     Wed 02 Mar 2011 01:08:08 AM WET
Local ID                      45827b6e-3860-404e-87c1-1d557edacc76

Raw Audit Messages
type=AVC msg=audit(1299028088.372:22883): avc:  denied  { open } for  pid=29182 comm="gedit" name="hosts" dev=sda1 ino=69471 scontext=unconfined_u:unconfined_r:sandbox_t:s0:c729,c816 tcontext=system_u:object_r:net_conf_t:s0 tclass=file


type=SYSCALL msg=audit(1299028088.372:22883): arch=i386 syscall=open success=no exit=EACCES a0=2b3b74 a1=80000 a2=1b6 a3=2b3b55 items=0 ppid=29181 pid=29182 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=pts59 ses=1 comm=gedit exe=/usr/bin/gedit subj=unconfined_u:unconfined_r:sandbox_t:s0:c729,c816 key=(null)

Hash: gedit,sandbox_t,net_conf_t,file,open

audit2allow

#============= sandbox_t ==============
allow sandbox_t net_conf_t:file open;

audit2allow -R

#============= sandbox_t ==============
allow sandbox_t net_conf_t:file open;

Comment 1 Miroslav Grepl 2011-05-10 11:44:08 UTC
Standard sandbox is not allowed to open any files. You need to pass in files via file descriptors.

If you want to run X apps within a sandbox you need to run "sandbox -X"

Comment 2 Miroslav Grepl 2011-05-10 11:44:54 UTC
*** Bug 703444 has been marked as a duplicate of this bug. ***

Comment 3 Miroslav Grepl 2011-05-10 11:45:36 UTC
*** Bug 703447 has been marked as a duplicate of this bug. ***

Comment 4 Miroslav Grepl 2011-05-10 11:46:13 UTC
*** Bug 703448 has been marked as a duplicate of this bug. ***


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