Bug 743545

Summary: SELinux is preventing /usr/sbin/sshd from 'getattr' accesses on the directory /home/piro/.gvfs.
Product: [Fedora] Fedora Reporter: luigi <l.piro>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 14CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:495f61c8591c5e1d25e3337130c77cc3307071530dd841d27225d8bbb988e734
Fixed In Version: selinux-policy-3.9.7-46.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-30 00:34:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description luigi 2011-10-05 10:52:56 UTC
SELinux is preventing /usr/sbin/sshd from 'getattr' accesses on the directory /home/piro/.gvfs.

*****  Plugin catchall_boolean (89.3 confidence) suggests  *******************

If you want to allow sftp-internal to login to local users and read/write all files on the system, governed by DAC.
Then you must tell SELinux about this by enabling the 'sftpd_full_access' boolean.
Do
setsebool -P sftpd_full_access 1

*****  Plugin catchall (11.6 confidence) suggests  ***************************

If you believe that sshd should be allowed getattr access on the .gvfs directory 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 sshd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:sftpd_t:s0-s0:c0.c1023
Target Context                system_u:object_r:fusefs_t:s0
Target Objects                /home/piro/.gvfs [ dir ]
Source                        sshd
Source Path                   /usr/sbin/sshd
Port                          <Sconosciuto>
Host                          (removed)
Source RPM Packages           openssh-server-5.5p1-24.fc14.2
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-44.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.13-92.fc14.i686 #1 SMP Sat May
                              21 17:39:42 UTC 2011 i686 i686
Alert Count                   58
First Seen                    ven 01 apr 2011 16:12:20 CEST
Last Seen                     mer 05 ott 2011 13:06:21 CEST
Local ID                      ecea4c63-6ff9-4901-95eb-010dc68a3fd2

Raw Audit Messages
type=AVC msg=audit(1317812781.395:161132): avc:  denied  { getattr } for  pid=5732 comm="sshd" path="/home/piro/.gvfs" dev=fuse ino=1 scontext=system_u:system_r:sftpd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:fusefs_t:s0 tclass=dir


type=SYSCALL msg=audit(1317812781.395:161132): arch=i386 syscall=lstat64 success=no exit=EACCES a0=bfb141ec a1=bfb1418c a2=8daff4 a3=e items=0 ppid=5713 pid=5732 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=2247 comm=sshd exe=/usr/sbin/sshd subj=system_u:system_r:sftpd_t:s0-s0:c0.c1023 key=(null)

Hash: sshd,sftpd_t,fusefs_t,dir,getattr

audit2allow

#============= sftpd_t ==============
#!!!! This avc can be allowed using the boolean 'sftpd_full_access'

allow sftpd_t fusefs_t:dir getattr;

audit2allow -R

#============= sftpd_t ==============
#!!!! This avc can be allowed using the boolean 'sftpd_full_access'

allow sftpd_t fusefs_t:dir getattr;

Comment 1 Daniel Walsh 2011-10-07 14:34:22 UTC
We probably want to dontaudit this.

Comment 2 Miroslav Grepl 2011-10-20 08:52:32 UTC
selinux-policy-3.9.7-46.fc14

Comment 3 Fedora Update System 2011-10-20 11:58:36 UTC
selinux-policy-3.9.7-46.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.7-46.fc14

Comment 4 Fedora Update System 2011-10-22 08:21:53 UTC
Package selinux-policy-3.9.7-46.fc14:
* should fix your issue,
* was pushed to the Fedora 14 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.9.7-46.fc14'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-14734
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2011-10-30 00:34:35 UTC
selinux-policy-3.9.7-46.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.