Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
policy_module(dbus,1.0)
Chris PeBenito 0c3d17
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 0c3d17
init_daemon_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 0c3d17
allow system_dbusd_t self:capability { dac_override setgid setuid };
Chris PeBenito 0c3d17
dontaudit system_dbusd_t self:capability sys_tty_config;
Chris PeBenito 0c3d17
allow system_dbusd_t self:process getattr;
Chris PeBenito 0c3d17
allow system_dbusd_t self:dbus { send_msg acquire_svc };
Chris PeBenito 0c3d17
allow system_dbusd_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 0c3d17
allow system_dbusd_t self:unix_dgram_socket create_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 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 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 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 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 0c3d17
optional_policy(`authlogin.te',`
Chris PeBenito 0c3d17
	auth_read_pam_console_data(system_dbusd_t)
Chris PeBenito 0c3d17
')
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
optional_policy(`nis.te',`
Chris PeBenito 0c3d17
	nis_use_ypbind(system_dbusd_t)
Chris PeBenito 0c3d17
')
Chris PeBenito 0c3d17
Chris PeBenito 0c3d17
optional_policy(`nscd.te',`
Chris PeBenito 0c3d17
	nscd_use_socket(system_dbusd_t)
Chris PeBenito 0c3d17
')
Chris PeBenito 0c3d17
Chris PeBenito c0d156
optional_policy(`udev.te', `
Chris PeBenito c0d156
	udev_read_db(system_dbusd_t)
Chris PeBenito c0d156
')
Chris PeBenito c0d156
Chris PeBenito c0d156
ifdef(`TODO',`
Chris PeBenito 0c3d17
optional_policy(`rhgb.te',`
Chris PeBenito 0c3d17
	rhgb_domain(system_dbusd_t)
Chris PeBenito 0c3d17
')
Chris PeBenito 0c3d17
')