Chris PeBenito 0c3d17
Chris PeBenito f35fed
policy_module(dbus,1.2.6)
Chris PeBenito 0c3d17
Chris PeBenito a1fcff
gen_require(`
Chris PeBenito a1fcff
	class dbus { send_msg acquire_svc };
Chris PeBenito a1fcff
')
Chris PeBenito a1fcff
Chris PeBenito 0c3d17
##############################
Chris PeBenito 0c3d17
#
Chris PeBenito 0c3d17
# Delcarations
Chris PeBenito 0c3d17
#
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
type dbusd_etc_t alias etc_dbusd_t;
Chris PeBenito 0c3d17
files_type(dbusd_etc_t)
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
type system_dbusd_t alias dbusd_t;
Chris PeBenito 0c3d17
type system_dbusd_exec_t;
Chris PeBenito 142e9f
init_system_domain(system_dbusd_t,system_dbusd_exec_t)
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
type system_dbusd_tmp_t;
Chris PeBenito 0c3d17
files_tmp_file(system_dbusd_tmp_t)
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
type system_dbusd_var_run_t;
Chris PeBenito 0c3d17
files_pid_file(system_dbusd_var_run_t)
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
##############################
Chris PeBenito 0c3d17
#
Chris PeBenito 0c3d17
# Local policy
Chris PeBenito 0c3d17
#
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
# dac_override: /var/run/dbus is owned by messagebus on Debian
Chris PeBenito 0c3d17
# cjp: dac_override should probably go in a distro_debian
Chris PeBenito 3c8f6b
allow system_dbusd_t self:capability { dac_override setgid setpcap setuid };
Chris PeBenito 0c3d17
dontaudit system_dbusd_t self:capability sys_tty_config;
Chris PeBenito 049e11
allow system_dbusd_t self:process { getattr signal_perms setcap };
Chris PeBenito a1fcff
allow system_dbusd_t self:fifo_file { read write };
Chris PeBenito 0c3d17
allow system_dbusd_t self:dbus { send_msg acquire_svc };
Chris PeBenito 77f6e2
allow system_dbusd_t self:unix_stream_socket { connectto create_stream_socket_perms connectto };
Chris PeBenito 0c3d17
allow system_dbusd_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 77f6e2
allow system_dbusd_t self:netlink_audit_socket { create_netlink_socket_perms nlmsg_relay };
Chris PeBenito 522b59
allow system_dbusd_t self:netlink_route_socket r_netlink_socket_perms;
Chris PeBenito 0c3d17
# Receive notifications of policy reloads and enforcing status changes.
Chris PeBenito 0c3d17
allow system_dbusd_t self:netlink_selinux_socket { create bind read };
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
allow system_dbusd_t dbusd_etc_t:dir r_dir_perms;
Chris PeBenito 0c3d17
allow system_dbusd_t dbusd_etc_t:file r_file_perms;
Chris PeBenito 0c3d17
allow system_dbusd_t dbusd_etc_t:lnk_file { getattr read };
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
allow system_dbusd_t system_dbusd_tmp_t:dir create_dir_perms;
Chris PeBenito 0c3d17
allow system_dbusd_t system_dbusd_tmp_t:file create_file_perms;
Chris PeBenito 103fe2
files_tmp_filetrans(system_dbusd_t, system_dbusd_tmp_t, { file dir })
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
allow system_dbusd_t system_dbusd_var_run_t:file create_file_perms;
Chris PeBenito 0c3d17
allow system_dbusd_t system_dbusd_var_run_t:sock_file create_file_perms;
Chris PeBenito b53f93
allow system_dbusd_t system_dbusd_var_run_t:dir rw_dir_perms;
Chris PeBenito 1c1ac6
files_pid_filetrans(system_dbusd_t,system_dbusd_var_run_t,file)
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
kernel_read_system_state(system_dbusd_t)
Chris PeBenito 445522
kernel_read_kernel_sysctls(system_dbusd_t)
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
dev_read_urand(system_dbusd_t)
Chris PeBenito 0c3d17
dev_read_sysfs(system_dbusd_t)
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
fs_getattr_all_fs(system_dbusd_t)
Chris PeBenito 0c3d17
fs_search_auto_mountpoints(system_dbusd_t)
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
selinux_get_fs_mount(system_dbusd_t)
Chris PeBenito 0c3d17
selinux_validate_context(system_dbusd_t)
Chris PeBenito 0c3d17
selinux_compute_access_vector(system_dbusd_t)
Chris PeBenito 0c3d17
selinux_compute_create_context(system_dbusd_t)
Chris PeBenito 0c3d17
selinux_compute_relabel_context(system_dbusd_t)
Chris PeBenito 0c3d17
selinux_compute_user_contexts(system_dbusd_t)
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
term_dontaudit_use_console(system_dbusd_t)
Chris PeBenito 0c3d17
Chris PeBenito 77f6e2
auth_use_nsswitch(system_dbusd_t)
Chris PeBenito 77f6e2
auth_read_pam_console_data(system_dbusd_t)
Chris PeBenito 77f6e2
Chris PeBenito 0c3d17
corecmd_list_bin(system_dbusd_t)
Chris PeBenito 1815ba
corecmd_read_bin_symlinks(system_dbusd_t)
Chris PeBenito 1815ba
corecmd_read_bin_files(system_dbusd_t)
Chris PeBenito 1815ba
corecmd_read_bin_pipes(system_dbusd_t)
Chris PeBenito 1815ba
corecmd_read_bin_sockets(system_dbusd_t)
Chris PeBenito 0c3d17
corecmd_list_sbin(system_dbusd_t)
Chris PeBenito 1815ba
corecmd_read_sbin_symlinks(system_dbusd_t)
Chris PeBenito 1815ba
corecmd_read_sbin_files(system_dbusd_t)
Chris PeBenito 1815ba
corecmd_read_sbin_pipes(system_dbusd_t)
Chris PeBenito 1815ba
corecmd_read_sbin_sockets(system_dbusd_t)
Chris PeBenito a1fcff
corecmd_exec_sbin(system_dbusd_t)
Chris PeBenito 0c3d17
Chris PeBenito 15722e
domain_use_interactive_fds(system_dbusd_t)
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
files_read_etc_files(system_dbusd_t)
Chris PeBenito 0c3d17
files_list_home(system_dbusd_t)
Chris PeBenito 0c3d17
files_read_usr_files(system_dbusd_t)
Chris PeBenito 0c3d17
Chris PeBenito 1c1ac6
init_use_fds(system_dbusd_t)
Chris PeBenito 1815ba
init_use_script_ptys(system_dbusd_t)
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
libs_use_ld_so(system_dbusd_t)
Chris PeBenito 0c3d17
libs_use_shared_libs(system_dbusd_t)
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
logging_send_syslog_msg(system_dbusd_t)
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
miscfiles_read_localization(system_dbusd_t)
Chris PeBenito 8cfa5a
miscfiles_read_certs(system_dbusd_t)
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
seutil_read_config(system_dbusd_t)
Chris PeBenito 0c3d17
seutil_read_default_contexts(system_dbusd_t)
Chris PeBenito 0c3d17
seutil_sigchld_newrole(system_dbusd_t)
Chris PeBenito 0c3d17
Chris PeBenito 15722e
userdom_dontaudit_use_unpriv_user_fds(system_dbusd_t)
Chris PeBenito 103fe2
userdom_dontaudit_search_sysadm_home_dirs(system_dbusd_t)
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
ifdef(`targeted_policy', `
Chris PeBenito 1815ba
	term_dontaudit_use_unallocated_ttys(system_dbusd_t)
Chris PeBenito 1815ba
	term_dontaudit_use_generic_ptys(system_dbusd_t)
Chris PeBenito 9e04f5
	files_dontaudit_read_root_files(system_dbusd_t)
Chris PeBenito 0c3d17
')
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
tunable_policy(`read_default_t',`
Chris PeBenito 0c3d17
	files_list_default(system_dbusd_t)
Chris PeBenito 0c3d17
	files_read_default_files(system_dbusd_t)
Chris PeBenito 0c3d17
	files_read_default_symlinks(system_dbusd_t)
Chris PeBenito 0c3d17
	files_read_default_sockets(system_dbusd_t)
Chris PeBenito 0c3d17
	files_read_default_pipes(system_dbusd_t)
Chris PeBenito 0c3d17
')
Chris PeBenito 0c3d17
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito fe9d17
	bind_domtrans(system_dbusd_t)
Chris PeBenito fe9d17
')
Chris PeBenito fe9d17
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 1815ba
	nscd_socket_use(system_dbusd_t)
Chris PeBenito 0c3d17
')
Chris PeBenito 0c3d17
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 33acca
	sysnet_domtrans_dhcpc(system_dbusd_t)
Chris PeBenito 33acca
')
Chris PeBenito 33acca
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito c0d156
	udev_read_db(system_dbusd_t)
Chris PeBenito c0d156
')