|
Chris PeBenito |
bbc40b5 |
policy_module(gnome, 2.2.0)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
##############################
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
# Declarations
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
attribute gnomedomain;
|
|
|
1ec3d1a |
attribute gnome_home_type;
|
|
|
1ec3d1a |
attribute gkeyringd_domain;
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type gconf_etc_t;
|
|
|
1ec3d1a |
files_config_file(gconf_etc_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type data_home_t, gnome_home_type;
|
|
|
1ec3d1a |
userdom_user_home_content(data_home_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type config_home_t, gnome_home_type;
|
|
|
1ec3d1a |
userdom_user_home_content(config_home_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type cache_home_t, gnome_home_type;
|
|
|
1ec3d1a |
userdom_user_home_content(cache_home_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type gstreamer_home_t, gnome_home_type;
|
|
|
1ec3d1a |
userdom_user_home_content(gstreamer_home_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type dbus_home_t, gnome_home_type;
|
|
|
1ec3d1a |
userdom_user_home_content(dbus_home_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type icc_data_home_t, gnome_home_type;
|
|
|
1ec3d1a |
userdom_user_home_content(icc_data_home_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type gconf_home_t, gnome_home_type;
|
|
|
1ec3d1a |
typealias gconf_home_t alias { user_gconf_home_t staff_gconf_home_t sysadm_gconf_home_t };
|
|
|
1ec3d1a |
typealias gconf_home_t alias { auditadm_gconf_home_t secadm_gconf_home_t };
|
|
|
1ec3d1a |
typealias gconf_home_t alias unconfined_gconf_home_t;
|
|
|
1ec3d1a |
userdom_user_home_content(gconf_home_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type gconf_tmp_t;
|
|
|
1ec3d1a |
typealias gconf_tmp_t alias { user_gconf_tmp_t staff_gconf_tmp_t sysadm_gconf_tmp_t };
|
|
|
1ec3d1a |
typealias gconf_tmp_t alias { auditadm_gconf_tmp_t secadm_gconf_tmp_t };
|
|
|
1ec3d1a |
typealias gconf_tmp_t alias unconfined_gconf_tmp_t;
|
|
Chris PeBenito |
66b26ac |
userdom_user_tmp_file(gconf_tmp_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type gconfd_t, gnomedomain;
|
|
|
1ec3d1a |
type gconfd_exec_t;
|
|
|
1ec3d1a |
typealias gconfd_t alias { user_gconfd_t staff_gconfd_t sysadm_gconfd_t };
|
|
|
1ec3d1a |
typealias gconfd_t alias { auditadm_gconfd_t secadm_gconfd_t };
|
|
Chris PeBenito |
66b26ac |
userdom_user_application_domain(gconfd_t, gconfd_exec_t)
|
|
Chris PeBenito |
9401ae1 |
|
|
|
be895b1 |
type gnome_home_t, gnome_home_type;
|
|
|
1ec3d1a |
typealias gnome_home_t alias { user_gnome_home_t staff_gnome_home_t sysadm_gnome_home_t };
|
|
|
1ec3d1a |
typealias gnome_home_t alias { auditadm_gnome_home_t secadm_gnome_home_t };
|
|
|
1ec3d1a |
typealias gnome_home_t alias unconfined_gnome_home_t;
|
|
|
1ec3d1a |
userdom_user_home_content(gnome_home_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
# type KDE /usr/share/config files
|
|
|
1ec3d1a |
type config_usr_t;
|
|
|
1ec3d1a |
files_type(config_usr_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type gkeyringd_exec_t;
|
|
|
1ec3d1a |
corecmd_executable_file(gkeyringd_exec_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type gkeyringd_gnome_home_t;
|
|
|
1ec3d1a |
userdom_user_home_content(gkeyringd_gnome_home_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type gkeyringd_tmp_t;
|
|
|
1ec3d1a |
userdom_user_tmp_content(gkeyringd_tmp_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type gconfdefaultsm_t;
|
|
|
1ec3d1a |
type gconfdefaultsm_exec_t;
|
|
|
1ec3d1a |
init_daemon_domain(gconfdefaultsm_t, gconfdefaultsm_exec_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type gnomesystemmm_t;
|
|
|
1ec3d1a |
type gnomesystemmm_exec_t;
|
|
|
1ec3d1a |
init_daemon_domain(gnomesystemmm_t, gnomesystemmm_exec_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
##############################
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
# Local Policy
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
allow gconfd_t self:process getsched;
|
|
|
1ec3d1a |
allow gconfd_t self:fifo_file rw_fifo_file_perms;
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
manage_dirs_pattern(gconfd_t, gconf_home_t, gconf_home_t)
|
|
|
1ec3d1a |
manage_files_pattern(gconfd_t, gconf_home_t, gconf_home_t)
|
|
|
1ec3d1a |
userdom_user_home_dir_filetrans(gconfd_t, gconf_home_t, dir)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
manage_dirs_pattern(gconfd_t, gconf_tmp_t, gconf_tmp_t)
|
|
|
1ec3d1a |
manage_files_pattern(gconfd_t, gconf_tmp_t, gconf_tmp_t)
|
|
|
1ec3d1a |
userdom_user_tmp_filetrans(gconfd_t, gconf_tmp_t, { dir file })
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
allow gconfd_t gconf_etc_t:dir list_dir_perms;
|
|
|
1ec3d1a |
read_files_pattern(gconfd_t, gconf_etc_t, gconf_etc_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
dev_read_urand(gconfd_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
logging_send_syslog_msg(gconfd_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
userdom_manage_user_tmp_sockets(gconfd_t)
|
|
|
1ec3d1a |
userdom_manage_user_tmp_dirs(gconfd_t)
|
|
|
1ec3d1a |
userdom_tmp_filetrans_user_tmp(gconfd_t, dir)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
1ec3d1a |
nscd_dontaudit_search_pid(gconfd_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
1ec3d1a |
xserver_use_xdm_fds(gconfd_t)
|
|
|
1ec3d1a |
xserver_rw_xdm_pipes(gconfd_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
#######################################
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
# gconf-defaults-mechanisms local policy
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
allow gconfdefaultsm_t self:capability { dac_override sys_nice };
|
|
|
1ec3d1a |
allow gconfdefaultsm_t self:process getsched;
|
|
|
1ec3d1a |
allow gconfdefaultsm_t self:fifo_file rw_fifo_file_perms;
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
corecmd_search_bin(gconfdefaultsm_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
gnome_manage_gconf_home_files(gconfdefaultsm_t)
|
|
|
1ec3d1a |
gnome_manage_gconf_config(gconfdefaultsm_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
userdom_read_all_users_state(gconfdefaultsm_t)
|
|
|
1ec3d1a |
userdom_search_user_home_dirs(gconfdefaultsm_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
userdom_dontaudit_search_admin_dir(gconfdefaultsm_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
1ec3d1a |
consolekit_dbus_chat(gconfdefaultsm_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
07b7aba |
dbus_system_domain(gconfdefaultsm_t, gconfdefaultsm_exec_t)
|
|
|
07b7aba |
')
|
|
|
07b7aba |
|
|
|
07b7aba |
optional_policy(`
|
|
|
1ec3d1a |
nscd_dontaudit_search_pid(gconfdefaultsm_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
1ec3d1a |
policykit_domtrans_auth(gconfdefaultsm_t)
|
|
|
1ec3d1a |
policykit_dbus_chat(gconfdefaultsm_t)
|
|
|
1ec3d1a |
policykit_read_lib(gconfdefaultsm_t)
|
|
|
1ec3d1a |
policykit_read_reload(gconfdefaultsm_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
userdom_home_manager(gconfdefaultsm_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
#######################################
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
# gnome-system-monitor-mechanisms local policy
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
allow gnomesystemmm_t self:capability sys_nice;
|
|
|
1ec3d1a |
allow gnomesystemmm_t self:fifo_file rw_fifo_file_perms;
|
|
|
1ec3d1a |
|
|
|
175bac6 |
rw_files_pattern(gnomesystemmm_t, config_usr_t, config_usr_t)
|
|
|
175bac6 |
|
|
|
1ec3d1a |
kernel_read_system_state(gnomesystemmm_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
corecmd_search_bin(gnomesystemmm_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
domain_kill_all_domains(gnomesystemmm_t)
|
|
|
1ec3d1a |
domain_search_all_domains_state(gnomesystemmm_t)
|
|
|
1ec3d1a |
domain_setpriority_all_domains(gnomesystemmm_t)
|
|
|
1ec3d1a |
domain_signal_all_domains(gnomesystemmm_t)
|
|
|
1ec3d1a |
domain_sigstop_all_domains(gnomesystemmm_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
fs_getattr_xattr_fs(gnomesystemmm_t)
|
|
|
1ec3d1a |
|
|
|
7b60e40 |
auth_read_passwd(gnomesystemmm_t)
|
|
|
7b60e40 |
|
|
|
1ec3d1a |
logging_send_syslog_msg(gnomesystemmm_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
userdom_read_all_users_state(gnomesystemmm_t)
|
|
|
1ec3d1a |
userdom_dontaudit_search_admin_dir(gnomesystemmm_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
1ec3d1a |
consolekit_dbus_chat(gnomesystemmm_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
07b7aba |
dbus_system_domain(gnomesystemmm_t, gnomesystemmm_exec_t)
|
|
|
07b7aba |
')
|
|
|
07b7aba |
|
|
|
07b7aba |
optional_policy(`
|
|
|
205e115 |
gnome_read_home_config(gnomesystemmm_t)
|
|
|
205e115 |
')
|
|
|
205e115 |
|
|
|
205e115 |
optional_policy(`
|
|
|
1ec3d1a |
nscd_dontaudit_search_pid(gnomesystemmm_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
1ec3d1a |
policykit_dbus_chat(gnomesystemmm_t)
|
|
|
1ec3d1a |
policykit_domtrans_auth(gnomesystemmm_t)
|
|
|
1ec3d1a |
policykit_read_lib(gnomesystemmm_t)
|
|
|
1ec3d1a |
policykit_read_reload(gnomesystemmm_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
######################################
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
# gnome-keyring-daemon local policy
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
allow gkeyringd_domain self:capability ipc_lock;
|
|
|
1ec3d1a |
allow gkeyringd_domain self:process { getcap getsched setcap signal };
|
|
|
1ec3d1a |
allow gkeyringd_domain self:fifo_file rw_fifo_file_perms;
|
|
|
1ec3d1a |
allow gkeyringd_domain self:unix_stream_socket { connectto accept listen };
|
|
|
1ec3d1a |
|
|
|
998715c |
allow gkeyringd_domain config_home_t:file write;
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
manage_dirs_pattern(gkeyringd_domain, gkeyringd_gnome_home_t, gkeyringd_gnome_home_t)
|
|
|
1ec3d1a |
manage_files_pattern(gkeyringd_domain, gkeyringd_gnome_home_t, gkeyringd_gnome_home_t)
|
|
|
40beb89 |
allow gkeyringd_domain data_home_t:dir create_dir_perms;
|
|
|
40beb89 |
allow gkeyringd_domain gconf_home_t:dir create_dir_perms;
|
|
|
40beb89 |
filetrans_pattern(gkeyringd_domain, gconf_home_t, data_home_t, dir, "share")
|
|
|
40beb89 |
filetrans_pattern(gkeyringd_domain, gnome_home_t, gkeyringd_gnome_home_t, dir, "keyrings")
|
|
|
40beb89 |
filetrans_pattern(gkeyringd_domain, gnome_home_t, data_home_t, dir, "keyrings")
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
manage_dirs_pattern(gkeyringd_domain, gkeyringd_tmp_t, gkeyringd_tmp_t)
|
|
|
1ec3d1a |
manage_sock_files_pattern(gkeyringd_domain, gkeyringd_tmp_t, gkeyringd_tmp_t)
|
|
|
1ec3d1a |
files_tmp_filetrans(gkeyringd_domain, gkeyringd_tmp_t, dir)
|
|
|
1ec3d1a |
userdom_user_tmp_filetrans(gkeyringd_domain, gkeyringd_tmp_t, { sock_file dir })
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
kernel_read_crypto_sysctls(gkeyringd_domain)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
corecmd_search_bin(gkeyringd_domain)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
dev_read_rand(gkeyringd_domain)
|
|
|
1ec3d1a |
dev_read_urand(gkeyringd_domain)
|
|
|
1ec3d1a |
dev_read_sysfs(gkeyringd_domain)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
# for nscd?
|
|
|
1ec3d1a |
files_search_pids(gkeyringd_domain)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
fs_getattr_xattr_fs(gkeyringd_domain)
|
|
|
1ec3d1a |
fs_getattr_tmpfs(gkeyringd_domain)
|
|
|
1ec3d1a |
|
|
|
40beb89 |
userdom_user_home_dir_filetrans(gkeyringd_domain, gconf_home_t, dir, ".local")
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
1ec3d1a |
xserver_append_xdm_home_files(gkeyringd_domain)
|
|
|
1ec3d1a |
xserver_read_xdm_home_files(gkeyringd_domain)
|
|
|
1ec3d1a |
xserver_use_xdm_fds(gkeyringd_domain)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
1ec3d1a |
gnome_read_home_config(gkeyringd_domain)
|
|
|
1ec3d1a |
gnome_read_generic_cache_files(gkeyringd_domain)
|
|
|
1ec3d1a |
gnome_write_generic_cache_files(gkeyringd_domain)
|
|
|
1ec3d1a |
gnome_manage_cache_home_dir(gkeyringd_domain)
|
|
|
1ec3d1a |
gnome_manage_generic_cache_sockets(gkeyringd_domain)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
1ec3d1a |
ssh_read_user_home_files(gkeyringd_domain)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
domain_use_interactive_fds(gnomedomain)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
userdom_use_inherited_user_terminals(gnomedomain)
|