Bug 826619

Summary: SELinux is preventing /usr/sbin/rsyslogd from 'search' accesses on the directory samba.
Product: [Fedora] Fedora Reporter: sahinsureyya
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE 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:eae900280b7f12189af19a9bb7141e96ac31cf5a4a87d9cf3f758fd2e1225df1
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-31 17:53:27 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 sahinsureyya 2012-05-30 15:45:01 UTC
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.3.7-1.fc17.x86_64
time:           Wed 30 May 2012 11:43:25 AM EDT

description:
:SELinux is preventing /usr/sbin/rsyslogd from 'search' accesses on the directory samba.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that rsyslogd should be allowed search access on the samba 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 rsyslogd /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:syslogd_t:s0
:Target Context                system_u:object_r:samba_etc_t:s0
:Target Objects                samba [ dir ]
:Source                        rsyslogd
:Source Path                   /usr/sbin/rsyslogd
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           rsyslog-5.8.10-1.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-125.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.3.7-1.fc17.x86_64 #1 SMP Mon May 21
:                              22:32:19 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    Wed 30 May 2012 11:42:10 AM EDT
:Last Seen                     Wed 30 May 2012 11:42:10 AM EDT
:Local ID                      d9b4d417-e5e6-4357-9c79-e491795d1f81
:
:Raw Audit Messages
:type=AVC msg=audit(1338392530.992:31): avc:  denied  { search } for  pid=732 comm="rsyslogd" name="samba" dev="dm-0" ino=1205678 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:samba_etc_t:s0 tclass=dir
:
:
:type=SYSCALL msg=audit(1338392530.992:31): arch=x86_64 syscall=open success=no exit=EACCES a0=7f388f44d7a0 a1=0 a2=0 a3=78 items=0 ppid=1 pid=732 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=rsyslogd exe=/usr/sbin/rsyslogd subj=system_u:system_r:syslogd_t:s0 key=(null)
:
:Hash: rsyslogd,syslogd_t,samba_etc_t,dir,search
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:

Comment 1 Daniel Walsh 2012-05-30 17:06:48 UTC
Any idea why rsyslod would be searching the /etc/samba directory?

Comment 2 sahinsureyya 2012-05-30 19:48:02 UTC
(In reply to comment #1)
> Any idea why rsyslod would be searching the /etc/samba directory?

I am not sure, I installed samba-winbind package for connecting to wireless internet provided by a public library. You need to additionally edit the /etc/nsswitch.conf file and change the hosts line to

hosts: files dns wins (instead of hosts: files dns myhostname).

This hack is the only way I can connect to the internet provided by the library. This may be the reason I am greeted by selinux on every login perhaps.

Comment 3 Daniel Walsh 2012-05-30 21:06:11 UTC
If you do this in permissive mode do you see any additional avc messages?

Comment 4 sahinsureyya 2012-05-30 22:10:18 UTC
(In reply to comment #3)
> If you do this in permissive mode do you see any additional avc messages?

OK, I edited the /etc/selinux/config file and set "SELINUX=permissive", while kept "SELINUXTYPE=targeted". I rebooted to see if I get selinux messages and I get another one, related to sendmail this time. I reported this to bugzilla as well.

Comment 5 sahinsureyya 2012-05-30 22:35:38 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > If you do this in permissive mode do you see any additional avc messages?
> 
> OK, I edited the /etc/selinux/config file and set "SELINUX=permissive",
> while kept "SELINUXTYPE=targeted". I rebooted to see if I get selinux
> messages and I get another one, related to sendmail this time. I reported
> this to bugzilla as well.

Actually, there were 6 alerts in permissive mode, I didn't realize in my first login to my account in permissive mode. I sent a few more reports to bugzilla. I switched back to enforcing and this time I am getting 2 alerts; this one and another related to chronyd (bug 826753 I guess).

Comment 6 Daniel Walsh 2012-05-31 17:53:27 UTC

*** This bug has been marked as a duplicate of bug 826751 ***