Bug 770073 - SELinux is preventing /bin/bash from 'read' accesses on the file /home/amit/.sandboxrc.
Summary: SELinux is preventing /bin/bash from 'read' accesses on the file /home/amit/....
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 16
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:0cf2d3a63f643e243109bd9075a...
: 770074 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-23 09:41 UTC by Amit Shah
Modified: 2012-06-13 15:54 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-13 15:54:53 UTC
Type: ---


Attachments (Terms of Use)

Description Amit Shah 2011-12-23 09:41:48 UTC
libreport version: 2.0.8
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.1.5-6.fc16.x86_64
reason:         SELinux is preventing /bin/bash from 'read' accesses on the file /home/amit/.sandboxrc.
time:           Fri 23 Dec 2011 03:11:27 PM IST

description:
:SELinux is preventing /bin/bash from 'read' accesses on the file /home/amit/.sandboxrc.
:
:*****  Plugin restorecon (99.5 confidence) suggests  *************************
:
:If you want to fix the label. 
:/home/amit/.sandboxrc default label should be user_home_t.
:Then you can run restorecon.
:Do
:# /sbin/restorecon -v /home/amit/.sandboxrc
:
:*****  Plugin catchall (1.49 confidence) suggests  ***************************
:
:If you believe that bash should be allowed read access on the .sandboxrc 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 .sandboxrc /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                unconfined_u:unconfined_r:sandbox_web_client_t:s0:
:                              c686,c948
:Target Context                unconfined_u:object_r:sandbox_file_t:s0:c479,c507
:Target Objects                /home/amit/.sandboxrc [ file ]
:Source                        .sandboxrc
:Source Path                   /bin/bash
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           bash-4.2.20-1.fc16
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-64.fc16
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.1.5-6.fc16.x86_64 #1 SMP
:                              Thu Dec 15 16:14:44 UTC 2011 x86_64 x86_64
:Alert Count                   1
:First Seen                    Fri 23 Dec 2011 12:10:25 AM IST
:Last Seen                     Fri 23 Dec 2011 12:10:25 AM IST
:Local ID                      cdd641b8-19a4-4b2b-a198-a2ec5ac353c9
:
:Raw Audit Messages
:type=AVC msg=audit(1324579225.663:6601): avc:  denied  { read } for  pid=32171 comm=".sandboxrc" path="/home/amit/.sandboxrc" dev=dm-2 ino=3806126 scontext=unconfined_u:unconfined_r:sandbox_web_client_t:s0:c686,c948 tcontext=unconfined_u:object_r:sandbox_file_t:s0:c479,c507 tclass=file
:
:
:type=SYSCALL msg=audit(1324579225.663:6601): arch=x86_64 syscall=read success=no exit=EACCES a0=ff a1=1e65520 a2=e2 a3=8 items=0 ppid=32170 pid=32171 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=170 comm=.sandboxrc exe=/bin/bash subj=unconfined_u:unconfined_r:sandbox_web_client_t:s0:c686,c948 key=(null)
:
:Hash: .sandboxrc,sandbox_web_client_t,sandbox_file_t,file,read
:
:audit2allow
:
:#============= sandbox_web_client_t ==============
:#!!!! This avc is a constraint violation.  You will need to add an attribute to either the source or target type to make it work.
:#Constraint rule: 
:allow sandbox_web_client_t sandbox_file_t:file read;
:
:audit2allow -R
:
:#============= sandbox_web_client_t ==============
:#!!!! This avc is a constraint violation.  You will need to add an attribute to either the source or target type to make it work.
:#Constraint rule: 
:allow sandbox_web_client_t sandbox_file_t:file read;
:

Comment 1 Daniel Walsh 2011-12-29 18:11:21 UTC
Did you attempt to setup a permanent homedir?

Comment 2 Daniel Walsh 2011-12-29 18:15:44 UTC
*** Bug 770074 has been marked as a duplicate of this bug. ***

Comment 3 Amit Shah 2011-12-30 06:55:20 UTC
(In reply to comment #1)
> Did you attempt to setup a permanent homedir?

I use this command to invoke the sandbox:

sandbox -X -W metacity -t sandbox_web_t -H ~/.sandbox_ff_home firefox

The directory ~/.sandbox_ff_home has been unmodified in quite a while.

drwxrwxr-x. amit amit unconfined_u:object_r:sandbox_file_t:s0:c301,c788 .sandbox_ff_home

Comment 4 Miroslav Grepl 2012-01-02 13:35:00 UTC
Could you test it with a different homedir?

Comment 5 Daniel Walsh 2012-01-03 16:20:45 UTC
sandbox is supposed to change the label of the homedir to match the MCS label it chose. It looks like this is failing for some reason.

Comment 6 Miroslav Grepl 2012-01-03 23:39:31 UTC
Yes. But it is working for me.

Comment 7 Miroslav Grepl 2012-03-15 15:21:52 UTC
Are you still getting it?

Comment 8 Amit Shah 2012-06-13 12:25:55 UTC
Haven't got it in quite a while

Comment 9 Daniel Walsh 2012-06-13 15:54:53 UTC
Ok reopen if it happens again.


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