Background: I installed asterisk with asterisk-odbc addon; connecting via mySQL driver to the MySQL database for writing the cdr data to a database table. This SELinux report comes up, if you (then) start asterisk from the command console. Zusammenfassung: SELinux is preventing /usr/sbin/asterisk "search" access on /var/lib/mysql. Detaillierte Beschreibung: [asterisk hat einen toleranten Typ (asterisk_t). Dieser Zugriff wurde nicht verweigert.] SELinux denied access requested by asterisk. It is not expected that this access is required by asterisk and this access may signal an intrusion attempt. It is also possible that the specific version or configuration of the application is causing it to require additional access. Zugriff erlauben: You can generate a local policy module to allow this access - see FAQ (http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Please file a bug report. Zusätzliche Informationen: Quellkontext unconfined_u:system_r:asterisk_t:s0 Zielkontext system_u:object_r:mysqld_db_t:s0 Zielobjekte /var/lib/mysql [ dir ] Quelle asterisk Quellen-Pfad /usr/sbin/asterisk Port <Unbekannt> Host (removed) Quellen-RPM-Pakete asterisk-1.6.1.11-1.fc12 Ziel-RPM-Pakete mysql-server-5.1.41-2.fc12 RPM-Richtlinie selinux-policy-3.6.32-59.fc12 SELinux aktiviert True Richtlinienversion targeted Enforcing-Modus Enforcing Plugin-Name catchall Hostname (removed) Plattform Linux (removed) 2.6.31.9-174.fc12.x86_64 #1 SMP Mon Dec 21 05:33:33 UTC 2009 x86_64 x86_64 Anzahl der Alarme 6 Zuerst gesehen Di 29 Dez 2009 12:33:36 CET Zuletzt gesehen Di 29 Dez 2009 12:44:33 CET Lokale ID 34e4ce3e-6bab-47e6-92f8-8e6634f4bc4d Zeilennummern Raw-Audit-Meldungen node=(removed) type=AVC msg=audit(1262087073.831:36311): avc: denied { search } for pid=5469 comm="asterisk" name="mysql" dev=md0 ino=3015068 scontext=unconfined_u:system_r:asterisk_t:s0 tcontext=system_u:object_r:mysqld_db_t:s0 tclass=dir node=(removed) type=AVC msg=audit(1262087073.831:36311): avc: denied { write } for pid=5469 comm="asterisk" name="mysql.sock" dev=md0 ino=3016872 scontext=unconfined_u:system_r:asterisk_t:s0 tcontext=system_u:object_r:mysqld_var_run_t:s0 tclass=sock_file node=(removed) type=AVC msg=audit(1262087073.831:36311): avc: denied { connectto } for pid=5469 comm="asterisk" path="/var/lib/mysql/mysql.sock" scontext=unconfined_u:system_r:asterisk_t:s0 tcontext=system_u:system_r:mysqld_t:s0 tclass=unix_stream_socket node=(removed) type=SYSCALL msg=audit(1262087073.831:36311): arch=c000003e syscall=42 success=yes exit=128 a0=9 a1=7fff0073d7b0 a2=6e a3=7fff0073caf0 items=0 ppid=1 pid=5469 auid=500 uid=489 gid=473 euid=489 suid=489 fsuid=489 egid=473 sgid=473 fsgid=473 tty=(none) ses=2 comm="asterisk" exe="/usr/sbin/asterisk" subj=unconfined_u:system_r:asterisk_t:s0 key=(null) Hash String generated from selinux-policy-3.6.32-59.fc12,catchall,asterisk,asterisk_t,mysqld_db_t,dir,search audit2allow suggests: audit2allow is not installed.
Not necessarily prio medium (did not had the chance to change it though); please treat as prio low.
Why is asterisk communicating with the mysql database?
Never mind. 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-65.fc12.noarch
selinux-policy-3.6.32-66.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-66.fc12
selinux-policy-3.6.32-66.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-2010-0184
selinux-policy-3.6.32-66.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.