Edit: Here is the link to the full logs:
pastebin 4NtFy31D
pastebin jX3BR1tf
Leaving out a bunch of the repeated messages, but here are the relevant.
When restarting the service and attempting to use the web interface, I see these lines:
Code: Select all
type=AVC msg=audit(1393023280.624:1465): avc: denied { write } for pid=5174 comm="zmdc.pl" name="zmdc.sock" dev=dm-0 ino=2622903 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=sock_file
type=SYSCALL msg=audit(1393023280.624:1465): arch=c000003e syscall=42 success=no exit=-13 a0=3 a1=23f8720 a2=6e a3=7fff113ee720 items=0 ppid=1368 pid=5174 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm="zmdc.pl" exe="/usr/bin/perl" subj=system_u:system_r:httpd_t:s0 key=(null)
type=AVC msg=audit(1393023280.780:1466): avc: denied { write } for pid=5176 comm="zmdc.pl" name="zmdc.sock" dev=dm-0 ino=2622903 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=sock_file
When trying to restart the service from the web interface, I get these:
Code: Select all
type=AVC msg=audit(1393023419.897:1467): avc: denied { write } for pid=5189 comm="zmdc.pl" name="zmdc.sock" dev=dm-0 ino=2622903 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=sock_file
type=AVC msg=audit(1393023422.309:1468): avc: denied { write } for pid=5191 comm="zmdc.pl" name="zmdc.sock" dev=dm-0 ino=2622903 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=sock_file
type=AVC msg=audit(1393023423.789:1469): avc: denied { write } for pid=5198 comm="zmdc.pl" name="zmdc.sock" dev=dm-0 ino=2622903 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=sock_file
type=AVC msg=audit(1393023423.960:1470): avc: denied { write } for pid=5203 comm="zmdc.pl" name="zmdc.sock" dev=dm-0 ino=2622903 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=sock_file
type=AVC msg=audit(1393023423.965:1471): avc: denied { write } for pid=5203 comm="zmdc.pl" name="zmdc.sock" dev=dm-0 ino=2622903 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=sock_file
type=AVC msg=audit(1393023424.965:1472): avc: denied { write } for pid=5203 comm="zmdc.pl" name="zmdc.sock" dev=dm-0 ino=2622903 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=sock_file
type=AVC msg=audit(1393023425.034:1473): avc: denied { search } for pid=5208 comm="killall" name="1335" dev=proc ino=12545 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:postfix_master_t:s0 tclass=dir
type=AVC msg=audit(1393023425.034:1474): avc: denied { search } for pid=5208 comm="killall" name="1344" dev=proc ino=12547 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:postfix_qmgr_t:s0 tclass=dir
type=AVC msg=audit(1393023425.035:1475): avc: denied { search } for pid=5208 comm="killall" name="4616" dev=proc ino=70379 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:postfix_pickup_t:s0 tclass=dir
type=AVC msg=audit(1393023425.035:1476): avc: denied { search } for pid=5208 comm="killall" name="5107" dev=proc ino=72674 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:system_r:initrc_t:s0 tclass=dir
type=AVC msg=audit(1393023425.035:1477): avc: denied { search } for pid=5208 comm="killall" name="5133" dev=proc ino=73194 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:system_r:initrc_t:s0 tclass=dir
. . . .
type=AVC msg=audit(1393023426.154:1653): avc: denied { search } for pid=5227 comm="killall" name="5167" dev=proc ino=73053 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:system_r:initrc_t:s0 tclass=dir
type=AVC msg=audit(1393023426.155:1654): avc: denied { unlink } for pid=5205 comm="zmdc.pl" name="zmdc.sock" dev=dm-0 ino=2622903 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=sock_file
type=AVC msg=audit(1393023426.965:1655): avc: denied { write } for pid=5203 comm="zmdc.pl" name="zmdc.sock" dev=dm-0 ino=2622903 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=sock_file
Yet another complaint:
Code: Select all
type=AVC msg=audit(1393024525.799:1684): avc: denied { create } for pid=1371 comm="httpd" name="zms-298109w.sock" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=sock_file
OK, after more fighting with SE Linux than I ever wanted, here is the final audit2allow file:
Code: Select all
module zoneminder 1.0;
require {
type afs_ka_port_t;
type netsupport_port_t;
type port_t;
type presence_port_t;
type postfix_pickup_t;
type ionixnetmon_port_t;
type glance_port_t;
type syslogd_port_t;
type mmcc_port_t;
type postfix_master_t;
type commplex_port_t;
type httpd_t;
type dcc_port_t;
type sip_port_t;
type amqp_port_t;
type condor_port_t;
type afs_fs_port_t;
type nodejs_debug_port_t;
type websm_port_t;
type afs_pt_port_t;
type postfix_qmgr_t;
type git_port_t;
type ipp_port_t;
type aol_port_t;
class udp_socket name_bind;
class file { getattr read open };
}
#============= httpd_t ==============
allow httpd_t afs_fs_port_t:udp_socket name_bind;
allow httpd_t afs_ka_port_t:udp_socket name_bind;
allow httpd_t afs_pt_port_t:udp_socket name_bind;
allow httpd_t amqp_port_t:udp_socket name_bind;
allow httpd_t aol_port_t:udp_socket name_bind;
allow httpd_t commplex_port_t:udp_socket name_bind;
allow httpd_t condor_port_t:udp_socket name_bind;
allow httpd_t dcc_port_t:udp_socket name_bind;
allow httpd_t git_port_t:udp_socket name_bind;
allow httpd_t glance_port_t:udp_socket name_bind;
allow httpd_t ionixnetmon_port_t:udp_socket name_bind;
#!!!! This avc can be allowed using the boolean 'allow_ypbind'
allow httpd_t ipp_port_t:udp_socket name_bind;
allow httpd_t mmcc_port_t:udp_socket name_bind;
allow httpd_t netsupport_port_t:udp_socket name_bind;
allow httpd_t nodejs_debug_port_t:udp_socket name_bind;
#!!!! This avc can be allowed using one of the these booleans:
# httpd_verify_dns, allow_ypbind
allow httpd_t port_t:udp_socket name_bind;
#!!!! This avc is allowed in the current policy
allow httpd_t postfix_master_t:file { read getattr open };
#!!!! This avc is allowed in the current policy
allow httpd_t postfix_pickup_t:file { read getattr open };
#!!!! This avc is allowed in the current policy
allow httpd_t postfix_qmgr_t:file { read getattr open };
allow httpd_t presence_port_t:udp_socket name_bind;
allow httpd_t sip_port_t:udp_socket name_bind;
#!!!! This avc can be allowed using the boolean 'allow_ypbind'
allow httpd_t syslogd_port_t:udp_socket name_bind;
allow httpd_t websm_port_t:udp_socket name_bind;