Bug 817321

Summary: SELinux is preventing /usr/libexec/gdm-session-worker from read, write access on the directory /home/misha.
Product: [Fedora] Fedora Reporter: Misha Shnurapet <shnurapet>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:a41055bd2f358fe00f3dc99c28a6f8e6854f5175518ea6efac222b609bf88eae
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-30 20:00:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Misha Shnurapet 2012-04-29 03:16:48 UTC
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.3.2-8.fc17.x86_64
time:           Вс. 29 апр. 2012 12:16:11

description:
:SELinux is preventing /usr/libexec/gdm-session-worker from read, write access on the directory /home/misha.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that gdm-session-worker should be allowed read write access on the misha 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 gdm-session-wor /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
:Target Context                unconfined_u:object_r:samba_share_t:s0
:Target Objects                /home/misha [ dir ]
:Source                        gdm-session-wor
:Source Path                   /usr/libexec/gdm-session-worker
:Port                          <Неизвестно>
:Host                          (removed)
:Source RPM Packages           gdm-3.4.1-1.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-118.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.3.2-8.fc17.x86_64 #1 SMP Sat Apr 21
:                              12:44:25 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    Вс. 29 апр. 2012 12:14:48
:Last Seen                     Вс. 29 апр. 2012 12:14:48
:Local ID                      8d96167f-3dcf-4981-ac60-cf277f3edf25
:
:Raw Audit Messages
:type=AVC msg=audit(1335669288.860:58): avc:  denied  { read write } for  pid=1701 comm="gdm-session-wor" name="misha" dev="sda4" ino=12836868 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:samba_share_t:s0 tclass=dir
:
:
:type=SYSCALL msg=audit(1335669288.860:58): arch=x86_64 syscall=access success=no exit=EACCES a0=e23610 a1=7 a2=e091a0 a3=7fff5df7a580 items=0 ppid=1404 pid=1701 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=2 comm=gdm-session-wor exe=/usr/libexec/gdm-session-worker subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)
:
:Hash: gdm-session-wor,xdm_t,samba_share_t,dir,read,write
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:

Comment 1 Daniel Walsh 2012-04-30 20:00:46 UTC
Your homedir should not be labeled samba_share_t, if you added a file context for this then you need to remove it.

semanage fcontext -l -C  | grep /home


If you want to share homedirs using samba then you need to turn on a boolean.

setsebool -P samba_enable_home_dirs 1

man samba_selinux

for further info.

Comment 2 Daniel Walsh 2012-04-30 20:01:15 UTC
*** Bug 817326 has been marked as a duplicate of this bug. ***