Bug 547468

Summary: SELinux is preventing Samba (smbd) "search" access to 4DC3BA73696361.
Product: [Fedora] Fedora Reporter: Otto Rey <otto_rey>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: dwalsh, mgrepl, otto_rey
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:f4b4cbe1fa1738208649f9070ffc9209c17180f93e23659a1ff121e54a6eab90
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-22 20:42: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:
Embargoed:

Description Otto Rey 2009-12-14 18:32:33 UTC
Resúmen:

SELinux is preventing Samba (smbd) "search" access to 4DC3BA73696361.

Descripción Detallada:

[SELinux esta en modo permisivo. Este acceso no fue denegado.]

SELinux denied samba access to 4DC3BA73696361. If you want to share this
directory with samba it has to have a file context label of samba_share_t. If
you did not intend to use 4DC3BA73696361 as a samba repository it could indicate
either a bug or it could signal a intrusion attempt. Please refer to 'man
samba_selinux' for more information on setting up Samba and SELinux.

Permitiendo Acceso:

You can alter the file context by executing chcon -R -t samba_share_t
'4DC3BA73696361' You must also change the default file context files on the
system in order to preserve them even on a full relabel. "semanage fcontext -a
-t samba_share_t '4DC3BA73696361'"

Comando para Corregir:

chcon -R -t samba_share_t '4DC3BA73696361'

Información Adicional:

Contexto Fuente               system_u:system_r:smbd_t:s0-s0:c0.c1023
Contexto Destino              unconfined_u:object_r:etc_runtime_t:s0
Objetos Destino               4DC3BA73696361 [ dir ]
Fuente                        smbd
Dirección de Fuente          smbd
Puerto                        <Desconocido>
Nombre de Equipo              (removed)
Paquetes RPM Fuentes          
Paquetes RPM Destinos         
RPM de Políticas             selinux-policy-3.6.32-55.fc12
SELinux Activado              True
Tipo de Política             targeted
Modo Obediente                Permissive
Nombre de Plugin              samba_share
Nombre de Equipo              (removed)
Plataforma                    Linux (removed)
                              2.6.31.6-166.fc12.x86_64 #1 SMP Wed Dec 9 10:46:22
                              EST 2009 x86_64 x86_64
Cantidad de Alertas           2
Visto por Primera Vez         lun 14 dic 2009 14:47:59 ART
Visto por Última Vez         lun 14 dic 2009 15:13:34 ART
ID Local                      172b4553-eace-4683-a7ab-d7e3994a6aeb
Números de Línea            

Mensajes de Auditoría Crudos 

node=(removed) type=AVC msg=audit(1260814414.968:24970): avc:  denied  { search } for  pid=7356 comm="smbd" name=4DC3BA73696361 dev=sda3 ino=32770 scontext=system_u:system_r:smbd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:etc_runtime_t:s0 tclass=dir



Hash String generated from  selinux-policy-3.6.32-55.fc12,samba_share,smbd,smbd_t,etc_runtime_t,dir,search
audit2allow suggests:

#============= smbd_t ==============
allow smbd_t etc_runtime_t:dir search;

Comment 1 Daniel Walsh 2009-12-15 13:48:09 UTC
I have no idea what 4DC3BA73696361 is?  Was it created at boot in an init script?

Looks like it is a directory.

Comment 2 Daniel Walsh 2009-12-15 13:49:35 UTC
You can add these rules for now using

# grep avc /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Fixed in selinux-policy-3.6.32-59.fc12.noarch

Comment 3 Fedora Update System 2009-12-16 13:55:50 UTC
selinux-policy-3.6.32-59.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-59.fc12

Comment 4 Fedora Update System 2009-12-18 04:43:58 UTC
selinux-policy-3.6.32-59.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-13384