Bug 669433 - SELinux is preventing /usr/sbin/asterisk from 'setattr' accesses on the directory /var/run/asterisk.
Summary: SELinux is preventing /usr/sbin/asterisk from 'setattr' accesses on the direc...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 14
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:2762b0c9b03...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-13 16:52 UTC by Jared Smith
Modified: 2011-01-25 15:41 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-25 15:41:15 UTC
Type: ---


Attachments (Terms of Use)

Description Jared Smith 2011-01-13 16:52:18 UTC
SELinux is preventing /usr/sbin/asterisk from 'setattr' accesses on the directory /var/run/asterisk.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that asterisk should be allowed setattr access on the asterisk 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 /usr/sbin/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:asterisk_var_run_t:s0
Target Objects                /var/run/asterisk [ dir ]
Source                        asterisk
Source Path                   /usr/sbin/asterisk
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           asterisk-1.6.2.12-0.1.rc1.fc14
Target RPM Packages           asterisk-1.6.2.12-0.1.rc1.fc14
Policy RPM                    selinux-policy-3.9.7-19.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.35.10-74.fc14.x86_64 #1 SMP Thu Dec 23
                              16:04:50 UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Thu 13 Jan 2011 11:46:56 AM EST
Last Seen                     Thu 13 Jan 2011 11:46:56 AM EST
Local ID                      796f845f-425a-4503-8772-00c226009b16

Raw Audit Messages
type=AVC msg=audit(1294937216.47:1192): avc:  denied  { setattr } for  pid=15649 comm="asterisk" name="asterisk" dev=dm-6 ino=131227 scontext=unconfined_u:system_r:asterisk_t:s0 tcontext=system_u:object_r:asterisk_var_run_t:s0 tclass=dir

asterisk,asterisk_t,asterisk_var_run_t,dir,setattr
type=SYSCALL msg=audit(1294937216.47:1192): arch=x86_64 syscall=chown success=no exit=EACCES a0=765f60 a1=1ed a2=ffffffff a3=7fffb0869fe0 items=0 ppid=15648 pid=15649 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=101 comm=asterisk exe=/usr/sbin/asterisk subj=unconfined_u:system_r:asterisk_t:s0 key=(null)
asterisk,asterisk_t,asterisk_var_run_t,dir,setattr

#============= asterisk_t ==============
allow asterisk_t asterisk_var_run_t:dir setattr;

Comment 1 Daniel Walsh 2011-01-13 18:59:02 UTC
Miroslav you should add

manage_dirs_pattern(asterisk_t, asterisk_var_run_t, asterisk_var_run_t)
and

files_pid_filetrans(asterisk_t, asterisk_var_run_t, { dir file })

Necessary for F15 also.


Note You need to log in before you can comment on or make changes to this bug.