Chris PeBenito 0c3d17
Chris PeBenito 049e11
policy_module(dbus,1.1.1)
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 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 0c3d17
files_create_tmp_files(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 0c3d17
files_create_pid(system_dbusd_t,system_dbusd_var_run_t)
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
kernel_read_system_state(system_dbusd_t)
Chris PeBenito 0c3d17
kernel_read_kernel_sysctl(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 0c3d17
corecmd_read_bin_symlink(system_dbusd_t)
Chris PeBenito 0c3d17
corecmd_read_bin_file(system_dbusd_t)
Chris PeBenito 0c3d17
corecmd_read_bin_pipe(system_dbusd_t)
Chris PeBenito 0c3d17
corecmd_read_bin_socket(system_dbusd_t)
Chris PeBenito 0c3d17
corecmd_list_sbin(system_dbusd_t)
Chris PeBenito 0c3d17
corecmd_read_sbin_symlink(system_dbusd_t)
Chris PeBenito 0c3d17
corecmd_read_sbin_file(system_dbusd_t)
Chris PeBenito 0c3d17
corecmd_read_sbin_pipe(system_dbusd_t)
Chris PeBenito 0c3d17
corecmd_read_sbin_socket(system_dbusd_t)
Chris PeBenito a1fcff
corecmd_exec_sbin(system_dbusd_t)
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
domain_use_wide_inherit_fd(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 0c3d17
init_use_fd(system_dbusd_t)
Chris PeBenito 0c3d17
init_use_script_pty(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 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 0c3d17
userdom_dontaudit_use_unpriv_user_fd(system_dbusd_t)
Chris PeBenito 0c3d17
userdom_dontaudit_search_sysadm_home_dir(system_dbusd_t)
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
ifdef(`targeted_policy', `
Chris PeBenito 0c3d17
	term_dontaudit_use_unallocated_tty(system_dbusd_t)
Chris PeBenito 0c3d17
	term_dontaudit_use_generic_pty(system_dbusd_t)
Chris PeBenito 0c3d17
	files_dontaudit_read_root_file(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 132880
optional_policy(`bind',`
Chris PeBenito fe9d17
	bind_domtrans(system_dbusd_t)
Chris PeBenito fe9d17
')
Chris PeBenito fe9d17
Chris PeBenito 132880
optional_policy(`nscd',`
Chris PeBenito 0c3d17
	nscd_use_socket(system_dbusd_t)
Chris PeBenito 0c3d17
')
Chris PeBenito 0c3d17
Chris PeBenito 132880
optional_policy(`sysnetwork',`
Chris PeBenito 33acca
	sysnet_domtrans_dhcpc(system_dbusd_t)
Chris PeBenito 33acca
')
Chris PeBenito 33acca
Chris PeBenito 132880
optional_policy(`udev',`
Chris PeBenito c0d156
	udev_read_db(system_dbusd_t)
Chris PeBenito c0d156
')