Bug 906850

Summary: SELinux is preventing /usr/sbin/smbd from 'lock' accesses on the file .
Product: [Fedora] Fedora Reporter: Seyhan <meseyhan>
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:6a3b941a06aa43627c4848d172c4a16041101322928572c06cdf78488dad2af4
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-04 10:52:48 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:
Attachments:
Description Flags
File: type
none
File: hashmarkername none

Description Seyhan 2013-02-01 17:09:08 UTC
Additional info:
libreport version: 2.0.18
kernel:         3.7.3-101.fc17.x86_64

description:
:SELinux is preventing /usr/sbin/smbd from 'lock' accesses on the file .
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that smbd should be allowed lock access on the  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 smbd /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:smbd_t:s0
:Target Context                system_u:object_r:home_root_t:s0
:Target Objects                 [ file ]
:Source                        smbd
:Source Path                   /usr/sbin/smbd
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           samba-3.6.9-96.fc17.1.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-166.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.7.3-101.fc17.x86_64 #1 SMP Fri
:                              Jan 18 17:40:57 UTC 2013 x86_64 x86_64
:Alert Count                   133
:First Seen                    2013-02-01 17:43:17 CET
:Last Seen                     2013-02-01 18:06:20 CET
:Local ID                      d0314d58-d4ea-4bb7-b315-a89283681c3f
:
:Raw Audit Messages
:type=AVC msg=audit(1359738380.907:476): avc:  denied  { lock } for  pid=15236 comm="smbd" path=2F686F6D652F7075626C69632F53474B79612044696C656BC3A7652E727466 dev="dm-2" ino=2097154 scontext=system_u:system_r:smbd_t:s0 tcontext=system_u:object_r:home_root_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1359738380.907:476): arch=x86_64 syscall=fcntl success=no exit=EACCES a0=23 a1=5 a2=7fff9c6b2660 a3=0 items=0 ppid=15234 pid=15236 auid=4294967295 uid=0 gid=0 euid=1001 suid=1001 fsuid=1001 egid=1001 sgid=1001 fsgid=1001 ses=4294967295 tty=(none) comm=smbd exe=/usr/sbin/smbd subj=system_u:system_r:smbd_t:s0 key=(null)
:
:Hash: smbd,smbd_t,home_root_t,file,lock
:
:audit2allow
:
:#============= smbd_t ==============
:#!!!! This avc can be allowed using one of the these booleans:
:#     samba_export_all_ro, samba_export_all_rw
:
:allow smbd_t home_root_t:file lock;
:
:audit2allow -R
:
:#============= smbd_t ==============
:#!!!! This avc can be allowed using one of the these booleans:
:#     samba_export_all_ro, samba_export_all_rw
:
:allow smbd_t home_root_t:file lock;
:

Comment 1 Seyhan 2013-02-01 17:09:12 UTC
Created attachment 691640 [details]
File: type

Comment 2 Seyhan 2013-02-01 17:09:14 UTC
Created attachment 691641 [details]
File: hashmarkername

Comment 3 Miroslav Grepl 2013-02-04 10:52:48 UTC
It looks like your homedir is mislabeled.

Could you try to execute

# restorecon -R -v /home