Chris PeBenito 17de1b
Chris PeBenito cfcf50
policy_module(dbus, 1.9.0)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
gen_require(`
Chris PeBenito 350b6a
	class dbus all_dbus_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
##############################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Delcarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type dbusd_etc_t alias etc_dbusd_t;
Chris PeBenito 17de1b
files_type(dbusd_etc_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type system_dbusd_t alias dbusd_t;
Chris PeBenito 17de1b
type system_dbusd_exec_t;
Chris PeBenito 0bfccd
init_system_domain(system_dbusd_t, system_dbusd_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type system_dbusd_tmp_t;
Chris PeBenito 17de1b
files_tmp_file(system_dbusd_tmp_t)
Chris PeBenito 17de1b
Chris PeBenito 8a9d6f
type system_dbusd_var_lib_t;
Chris PeBenito 8a9d6f
files_pid_file(system_dbusd_var_lib_t)
Chris PeBenito 8a9d6f
Chris PeBenito 17de1b
type system_dbusd_var_run_t;
Chris PeBenito 17de1b
files_pid_file(system_dbusd_var_run_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
##############################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# dac_override: /var/run/dbus is owned by messagebus on Debian
Chris PeBenito 17de1b
# cjp: dac_override should probably go in a distro_debian
Chris PeBenito c0868a
allow system_dbusd_t self:capability { dac_override setgid setpcap setuid };
Chris PeBenito 17de1b
dontaudit system_dbusd_t self:capability sys_tty_config;
Chris PeBenito 17de1b
allow system_dbusd_t self:process { getattr signal_perms setcap };
Chris PeBenito 17de1b
allow system_dbusd_t self:fifo_file { read write };
Chris PeBenito 17de1b
allow system_dbusd_t self:dbus { send_msg acquire_svc };
Chris PeBenito 17de1b
allow system_dbusd_t self:unix_stream_socket { connectto create_stream_socket_perms connectto };
Chris PeBenito 17de1b
allow system_dbusd_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 17de1b
# Receive notifications of policy reloads and enforcing status changes.
Chris PeBenito 17de1b
allow system_dbusd_t self:netlink_selinux_socket { create bind read };
Chris PeBenito 17de1b
Chris PeBenito c0868a
allow system_dbusd_t dbusd_etc_t:dir list_dir_perms;
Chris PeBenito 0bfccd
read_files_pattern(system_dbusd_t, dbusd_etc_t, dbusd_etc_t)
Chris PeBenito 0bfccd
read_lnk_files_pattern(system_dbusd_t, dbusd_etc_t, dbusd_etc_t)
Chris PeBenito c0868a
Chris PeBenito 0bfccd
manage_dirs_pattern(system_dbusd_t, system_dbusd_tmp_t, system_dbusd_tmp_t)
Chris PeBenito 0bfccd
manage_files_pattern(system_dbusd_t, system_dbusd_tmp_t, system_dbusd_tmp_t)
Chris PeBenito 17de1b
files_tmp_filetrans(system_dbusd_t, system_dbusd_tmp_t, { file dir })
Chris PeBenito 17de1b
Chris PeBenito 8a9d6f
read_files_pattern(system_dbusd_t, system_dbusd_var_lib_t, system_dbusd_var_lib_t)
Chris PeBenito 8a9d6f
Chris PeBenito 0bfccd
manage_files_pattern(system_dbusd_t, system_dbusd_var_run_t, system_dbusd_var_run_t)
Chris PeBenito 0bfccd
manage_sock_files_pattern(system_dbusd_t, system_dbusd_var_run_t, system_dbusd_var_run_t)
Chris PeBenito 0bfccd
files_pid_filetrans(system_dbusd_t, system_dbusd_var_run_t, file)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_system_state(system_dbusd_t)
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(system_dbusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_read_urand(system_dbusd_t)
Chris PeBenito 17de1b
dev_read_sysfs(system_dbusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_getattr_all_fs(system_dbusd_t)
Chris PeBenito 17de1b
fs_search_auto_mountpoints(system_dbusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
selinux_get_fs_mount(system_dbusd_t)
Chris PeBenito 17de1b
selinux_validate_context(system_dbusd_t)
Chris PeBenito 17de1b
selinux_compute_access_vector(system_dbusd_t)
Chris PeBenito 17de1b
selinux_compute_create_context(system_dbusd_t)
Chris PeBenito 17de1b
selinux_compute_relabel_context(system_dbusd_t)
Chris PeBenito 17de1b
selinux_compute_user_contexts(system_dbusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
term_dontaudit_use_console(system_dbusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
auth_use_nsswitch(system_dbusd_t)
Chris PeBenito 17de1b
auth_read_pam_console_data(system_dbusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
corecmd_list_bin(system_dbusd_t)
Chris PeBenito 17de1b
corecmd_read_bin_pipes(system_dbusd_t)
Chris PeBenito 17de1b
corecmd_read_bin_sockets(system_dbusd_t)
Chris PeBenito 8021cb
corecmd_exec_bin(system_dbusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_use_interactive_fds(system_dbusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_files(system_dbusd_t)
Chris PeBenito 17de1b
files_list_home(system_dbusd_t)
Chris PeBenito 17de1b
files_read_usr_files(system_dbusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
init_use_fds(system_dbusd_t)
Chris PeBenito 17de1b
init_use_script_ptys(system_dbusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
libs_use_ld_so(system_dbusd_t)
Chris PeBenito 17de1b
libs_use_shared_libs(system_dbusd_t)
Chris PeBenito 17de1b
Chris PeBenito d5b81a
logging_send_audit_msgs(system_dbusd_t)
Chris PeBenito 17de1b
logging_send_syslog_msg(system_dbusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(system_dbusd_t)
Chris PeBenito a5e213
miscfiles_read_certs(system_dbusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
seutil_read_config(system_dbusd_t)
Chris PeBenito 17de1b
seutil_read_default_contexts(system_dbusd_t)
Chris PeBenito 17de1b
seutil_sigchld_newrole(system_dbusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
userdom_dontaudit_use_unpriv_user_fds(system_dbusd_t)
Chris PeBenito e9c6cd
Chris PeBenito e9c6cd
sysadm_dontaudit_search_home_dirs(system_dbusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
tunable_policy(`read_default_t',`
Chris PeBenito 17de1b
	files_list_default(system_dbusd_t)
Chris PeBenito 17de1b
	files_read_default_files(system_dbusd_t)
Chris PeBenito 17de1b
	files_read_default_symlinks(system_dbusd_t)
Chris PeBenito 17de1b
	files_read_default_sockets(system_dbusd_t)
Chris PeBenito 17de1b
	files_read_default_pipes(system_dbusd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	bind_domtrans(system_dbusd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	sysnet_domtrans_dhcpc(system_dbusd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	udev_read_db(system_dbusd_t)
Chris PeBenito 17de1b
')