selinux-policy/policy/modules/services/gpsd.te
2010-08-26 09:41:21 -04:00

69 lines
1.6 KiB
Plaintext

policy_module(gpsd, 1.1.0)
########################################
#
# Declarations
#
type gpsd_t;
type gpsd_exec_t;
application_domain(gpsd_t, gpsd_exec_t)
init_daemon_domain(gpsd_t, gpsd_exec_t)
type gpsd_initrc_exec_t;
init_script_file(gpsd_initrc_exec_t)
type gpsd_tmpfs_t;
files_tmpfs_file(gpsd_tmpfs_t)
type gpsd_var_run_t;
files_pid_file(gpsd_var_run_t)
########################################
#
# gpsd local policy
#
allow gpsd_t self:capability { fowner fsetid setuid setgid sys_nice sys_tty_config };
allow gpsd_t self:process setsched;
allow gpsd_t self:shm create_shm_perms;
allow gpsd_t self:unix_dgram_socket { create_socket_perms sendto };
allow gpsd_t self:tcp_socket create_stream_socket_perms;
manage_dirs_pattern(gpsd_t, gpsd_tmpfs_t, gpsd_tmpfs_t)
manage_files_pattern(gpsd_t, gpsd_tmpfs_t, gpsd_tmpfs_t)
fs_tmpfs_filetrans(gpsd_t, gpsd_tmpfs_t, { dir file })
manage_files_pattern(gpsd_t, gpsd_var_run_t, gpsd_var_run_t)
manage_sock_files_pattern(gpsd_t, gpsd_var_run_t, gpsd_var_run_t)
files_pid_filetrans(gpsd_t, gpsd_var_run_t, { file sock_file })
corenet_all_recvfrom_unlabeled(gpsd_t)
corenet_all_recvfrom_netlabel(gpsd_t)
corenet_tcp_sendrecv_generic_if(gpsd_t)
corenet_tcp_sendrecv_generic_node(gpsd_t)
corenet_tcp_sendrecv_all_ports(gpsd_t)
corenet_tcp_bind_all_nodes(gpsd_t)
corenet_tcp_bind_gpsd_port(gpsd_t)
term_use_unallocated_ttys(gpsd_t)
term_setattr_unallocated_ttys(gpsd_t)
auth_use_nsswitch(gpsd_t)
logging_send_syslog_msg(gpsd_t)
miscfiles_read_localization(gpsd_t)
optional_policy(`
chronyd_rw_shm(gpsd_t)
')
optional_policy(`
dbus_system_bus_client(gpsd_t)
')
optional_policy(`
ntp_rw_shm(gpsd_t)
')