SELinux is preventing /usr/sbin/asterisk from 'search' accesses on the directory /home. ***** Plugin catchall (100. confidence) suggests *************************** If you believe that asterisk should be allowed search access on the home 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 asterisk /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp Additional Information: Source Context unconfined_u:system_r:asterisk_t:s0 Target Context system_u:object_r:home_root_t:s0 Target Objects /home [ dir ] Source asterisk Source Path /usr/sbin/asterisk Port <Unknown> Host (removed) Source RPM Packages asterisk-1.6.2.17-1.fc14 Target RPM Packages filesystem-2.4.35-1.fc14 Policy RPM selinux-policy-3.9.7-37.fc14 Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 2.6.35.11-83.fc14.x86_64 #1 SMP Mon Feb 7 07:06:44 UTC 2011 x86_64 x86_64 Alert Count 2 First Seen Wed 23 Mar 2011 12:21:13 PM WET Last Seen Wed 23 Mar 2011 12:25:10 PM WET Local ID c8c1e7cd-4cc5-4f6f-8474-270243cdf9b4 Raw Audit Messages type=AVC msg=audit(1300883110.394:22615): avc: denied { search } for pid=2202 comm="asterisk" name="home" dev=sda1 ino=798 scontext=unconfined_u:system_r:asterisk_t:s0 tcontext=system_u:object_r:home_root_t:s0 tclass=dir type=SYSCALL msg=audit(1300883110.394:22615): arch=x86_64 syscall=stat success=no exit=EACCES a0=7fff78159af0 a1=7fff781588b0 a2=7fff781588b0 a3=8 items=0 ppid=2194 pid=2202 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm=asterisk exe=/usr/sbin/asterisk subj=unconfined_u:system_r:asterisk_t:s0 key=(null) Hash: asterisk,asterisk_t,home_root_t,dir,search audit2allow #============= asterisk_t ============== allow asterisk_t home_root_t:dir search; audit2allow -R #============= asterisk_t ============== allow asterisk_t home_root_t:dir search;
Were you sitting in your homedir as root when you restarted this asterisk service?
Hi! I was, as root, at /etc/asterisk. I've already added some rules, as suggested by SELinux Troubleshooter. I've tried to see the contentes of the generated files using: grep asterisk /var/log/audit/audit.log | audit2allow -M mypol but they are binary files. I remember having troubles because asterisk wants to chown files on /etc/asterisk
When you run audit2allow -M mypol it also creates a mypol.te file with all the rules it wants to add.
ls -lZ /etc/asterisk
Created attachment 487115 [details] ls oputput
Created attachment 487119 [details] mypol.te
I've uploaded the output files.
Strange te rules. Can you attach a compresses audit.log you used to create these avcs. Actually just execute ausearch -m avc | gzip -c > /tmp/avcs.gz and attach that file. Why would asterisk be chown a file?
Created attachment 490499 [details] avcs.gz file as requested Sorry for the late reply, but here is the requested file.
Miroslav I have added changes to F15 policy can you back port setroubleshoot and astirisk policy to F13, F14, RHEL6. I think the pppd one is bogus. Not sure what caused it other then probably restarting it while sitting in the downloads directory.
It was fixed in F13/RHEL6. Fixed in selinux-policy-3.9.7-42.fc14
selinux-policy-3.9.7-42.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/selinux-policy-3.9.7-42.fc14
Package selinux-policy-3.9.7-42.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-42.fc14' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/selinux-policy-3.9.7-42.fc14 then log in and leave karma (feedback).
selinux-policy-3.9.7-42.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.