2009-11-17 15:05:56 +00:00
|
|
|
policy_module(policykit, 1.1.0)
|
2009-07-20 15:15:09 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type policykit_t alias polkit_t;
|
|
|
|
type policykit_exec_t alias polkit_exec_t;
|
|
|
|
init_daemon_domain(policykit_t, policykit_exec_t)
|
|
|
|
|
|
|
|
type policykit_auth_t alias polkit_auth_t;
|
|
|
|
type policykit_auth_exec_t alias polkit_auth_exec_t;
|
|
|
|
init_daemon_domain(policykit_auth_t, policykit_auth_exec_t)
|
|
|
|
|
|
|
|
type policykit_grant_t alias polkit_grant_t;
|
|
|
|
type policykit_grant_exec_t alias polkit_grant_exec_t;
|
|
|
|
init_system_domain(policykit_grant_t, policykit_grant_exec_t)
|
|
|
|
|
|
|
|
type policykit_resolve_t alias polkit_resolve_t;
|
|
|
|
type policykit_resolve_exec_t alias polkit_resolve_exec_t;
|
|
|
|
init_system_domain(policykit_resolve_t, policykit_resolve_exec_t)
|
|
|
|
|
|
|
|
type policykit_reload_t alias polkit_reload_t;
|
|
|
|
files_type(policykit_reload_t)
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
type policykit_tmp_t;
|
|
|
|
files_tmp_file(policykit_tmp_t)
|
|
|
|
|
2009-07-20 15:15:09 +00:00
|
|
|
type policykit_var_lib_t alias polkit_var_lib_t;
|
|
|
|
files_type(policykit_var_lib_t)
|
|
|
|
|
|
|
|
type policykit_var_run_t alias polkit_var_run_t;
|
|
|
|
files_pid_file(policykit_var_run_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# policykit local policy
|
|
|
|
#
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
allow policykit_t self:capability { dac_override dac_read_search setgid setuid sys_ptrace };
|
|
|
|
allow policykit_t self:process { getsched getattr signal };
|
|
|
|
allow policykit_t self:fifo_file rw_fifo_file_perms;
|
|
|
|
|
2009-07-20 15:15:09 +00:00
|
|
|
allow policykit_t self:unix_dgram_socket create_socket_perms;
|
2010-08-26 13:41:21 +00:00
|
|
|
allow policykit_t self:unix_stream_socket { create_stream_socket_perms connectto };
|
2009-07-20 15:15:09 +00:00
|
|
|
|
|
|
|
policykit_domtrans_auth(policykit_t)
|
|
|
|
|
|
|
|
can_exec(policykit_t, policykit_exec_t)
|
|
|
|
corecmd_exec_bin(policykit_t)
|
|
|
|
|
|
|
|
rw_files_pattern(policykit_t, policykit_reload_t, policykit_reload_t)
|
|
|
|
|
|
|
|
policykit_domtrans_resolve(policykit_t)
|
|
|
|
|
|
|
|
manage_files_pattern(policykit_t, policykit_var_lib_t, policykit_var_lib_t)
|
|
|
|
|
|
|
|
manage_dirs_pattern(policykit_t, policykit_var_run_t, policykit_var_run_t)
|
|
|
|
manage_files_pattern(policykit_t, policykit_var_run_t, policykit_var_run_t)
|
|
|
|
files_pid_filetrans(policykit_t, policykit_var_run_t, { file dir })
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
kernel_read_system_state(policykit_t)
|
2009-07-20 15:15:09 +00:00
|
|
|
kernel_read_kernel_sysctls(policykit_t)
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
domain_read_all_domains_state(policykit_t)
|
|
|
|
|
2009-07-20 15:15:09 +00:00
|
|
|
files_read_etc_files(policykit_t)
|
|
|
|
files_read_usr_files(policykit_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
files_dontaudit_search_all_mountpoints(policykit_t)
|
|
|
|
|
|
|
|
fs_list_inotifyfs(policykit_t)
|
2009-07-20 15:15:09 +00:00
|
|
|
|
|
|
|
auth_use_nsswitch(policykit_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(policykit_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(policykit_t)
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
userdom_getattr_all_users(policykit_t)
|
2009-07-20 15:15:09 +00:00
|
|
|
userdom_read_all_users_state(policykit_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
userdom_dontaudit_search_admin_dir(policykit_t)
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
dbus_system_domain(policykit_t, policykit_exec_t)
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
consolekit_dbus_chat(policykit_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
rpm_dbus_chat(policykit_t)
|
|
|
|
')
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
consolekit_list_pid_files(policykit_t)
|
|
|
|
consolekit_read_pid_files(policykit_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
gnome_read_config(policykit_t)
|
|
|
|
')
|
2009-07-20 15:15:09 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# polkit_auth local policy
|
|
|
|
#
|
|
|
|
|
2010-09-07 20:23:09 +00:00
|
|
|
allow policykit_auth_t self:capability { ipc_lock setgid setuid };
|
2010-08-26 13:41:21 +00:00
|
|
|
dontaudit policykit_auth_t self:capability sys_tty_config;
|
|
|
|
allow policykit_auth_t self:process { getattr getsched signal };
|
|
|
|
allow policykit_auth_t self:fifo_file rw_fifo_file_perms;
|
|
|
|
|
2009-07-20 15:15:09 +00:00
|
|
|
allow policykit_auth_t self:unix_dgram_socket create_socket_perms;
|
|
|
|
allow policykit_auth_t self:unix_stream_socket create_stream_socket_perms;
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
policykit_dbus_chat(policykit_auth_t)
|
|
|
|
|
|
|
|
kernel_read_system_state(policykit_auth_t)
|
|
|
|
|
2009-07-20 15:15:09 +00:00
|
|
|
can_exec(policykit_auth_t, policykit_auth_exec_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
corecmd_exec_bin(policykit_auth_t)
|
2009-07-20 15:15:09 +00:00
|
|
|
|
|
|
|
rw_files_pattern(policykit_auth_t, policykit_reload_t, policykit_reload_t)
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
manage_dirs_pattern(policykit_auth_t, policykit_tmp_t, policykit_tmp_t)
|
|
|
|
manage_files_pattern(policykit_auth_t, policykit_tmp_t, policykit_tmp_t)
|
|
|
|
files_tmp_filetrans(policykit_auth_t, policykit_tmp_t, { file dir })
|
|
|
|
|
2009-07-20 15:15:09 +00:00
|
|
|
manage_files_pattern(policykit_auth_t, policykit_var_lib_t, policykit_var_lib_t)
|
|
|
|
|
|
|
|
manage_dirs_pattern(policykit_auth_t, policykit_var_run_t, policykit_var_run_t)
|
|
|
|
manage_files_pattern(policykit_auth_t, policykit_var_run_t, policykit_var_run_t)
|
|
|
|
files_pid_filetrans(policykit_auth_t, policykit_var_run_t, { file dir })
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
kernel_dontaudit_search_kernel_sysctl(policykit_auth_t)
|
|
|
|
|
|
|
|
dev_read_video_dev(policykit_auth_t)
|
2009-08-18 13:48:28 +00:00
|
|
|
|
2009-07-20 15:15:09 +00:00
|
|
|
files_read_etc_files(policykit_auth_t)
|
|
|
|
files_read_usr_files(policykit_auth_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
files_search_home(policykit_auth_t)
|
|
|
|
|
|
|
|
fs_getattr_all_fs(polkit_auth_t)
|
|
|
|
fs_search_tmpfs(polkit_auth_t)
|
2009-07-20 15:15:09 +00:00
|
|
|
|
|
|
|
auth_use_nsswitch(policykit_auth_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
auth_read_var_auth(policykit_auth_t)
|
|
|
|
auth_domtrans_chk_passwd(policykit_auth_t)
|
2009-07-20 15:15:09 +00:00
|
|
|
|
|
|
|
logging_send_syslog_msg(policykit_auth_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(policykit_auth_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
miscfiles_read_fonts(policykit_auth_t)
|
|
|
|
miscfiles_setattr_fonts_cache_dirs(policykit_auth_t)
|
2009-07-20 15:15:09 +00:00
|
|
|
|
|
|
|
userdom_dontaudit_read_user_home_content_files(policykit_auth_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
userdom_dontaudit_write_user_tmp_files(policykit_auth_t)
|
|
|
|
userdom_read_admin_home_files(policykit_auth_t)
|
2009-07-20 15:15:09 +00:00
|
|
|
|
|
|
|
optional_policy(`
|
2010-08-26 13:41:21 +00:00
|
|
|
dbus_system_domain( policykit_auth_t, policykit_auth_exec_t)
|
2009-07-20 15:15:09 +00:00
|
|
|
dbus_session_bus_client(policykit_auth_t)
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
consolekit_dbus_chat(policykit_auth_t)
|
|
|
|
')
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
kernel_search_proc(policykit_auth_t)
|
|
|
|
hal_read_state(policykit_auth_t)
|
|
|
|
')
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
optional_policy(`
|
|
|
|
xserver_stream_connect(policykit_auth_t)
|
|
|
|
xserver_xdm_append_log(policykit_auth_t)
|
|
|
|
xserver_read_xdm_pid(policykit_auth_t)
|
|
|
|
xserver_search_xdm_lib(policykit_auth_t)
|
|
|
|
xserver_create_xdm_tmp_sockets(policykit_auth_t)
|
|
|
|
')
|
|
|
|
|
2009-07-20 15:15:09 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# polkit_grant local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow policykit_grant_t self:capability setuid;
|
|
|
|
allow policykit_grant_t self:process getattr;
|
2010-08-26 13:41:21 +00:00
|
|
|
allow policykit_grant_t self:fifo_file rw_fifo_file_perms;
|
|
|
|
|
2009-07-20 15:15:09 +00:00
|
|
|
allow policykit_grant_t self:unix_dgram_socket create_socket_perms;
|
|
|
|
allow policykit_grant_t self:unix_stream_socket create_stream_socket_perms;
|
|
|
|
|
|
|
|
policykit_domtrans_auth(policykit_grant_t)
|
|
|
|
|
|
|
|
policykit_domtrans_resolve(policykit_grant_t)
|
|
|
|
|
|
|
|
can_exec(policykit_grant_t, policykit_grant_exec_t)
|
|
|
|
corecmd_search_bin(policykit_grant_t)
|
|
|
|
|
|
|
|
rw_files_pattern(policykit_grant_t, policykit_reload_t, policykit_reload_t)
|
|
|
|
|
|
|
|
manage_files_pattern(policykit_grant_t, policykit_var_run_t, policykit_var_run_t)
|
|
|
|
|
|
|
|
manage_files_pattern(policykit_grant_t, policykit_var_lib_t, policykit_var_lib_t)
|
|
|
|
|
|
|
|
files_read_etc_files(policykit_grant_t)
|
|
|
|
files_read_usr_files(policykit_grant_t)
|
|
|
|
|
|
|
|
auth_use_nsswitch(policykit_grant_t)
|
|
|
|
auth_domtrans_chk_passwd(policykit_grant_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(policykit_grant_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(policykit_grant_t)
|
|
|
|
|
|
|
|
userdom_read_all_users_state(policykit_grant_t)
|
|
|
|
|
|
|
|
optional_policy(`
|
2010-08-26 13:41:21 +00:00
|
|
|
cron_manage_system_job_lib_files(policykit_grant_t)
|
|
|
|
')
|
2009-07-20 15:15:09 +00:00
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
optional_policy(`
|
|
|
|
dbus_system_bus_client(policykit_grant_t)
|
2009-07-20 15:15:09 +00:00
|
|
|
optional_policy(`
|
|
|
|
consolekit_dbus_chat(policykit_grant_t)
|
|
|
|
')
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# polkit_resolve local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow policykit_resolve_t self:capability { setuid sys_nice sys_ptrace };
|
|
|
|
allow policykit_resolve_t self:process getattr;
|
2010-08-26 13:41:21 +00:00
|
|
|
allow policykit_resolve_t self:fifo_file rw_fifo_file_perms;
|
|
|
|
|
2009-07-20 15:15:09 +00:00
|
|
|
allow policykit_resolve_t self:unix_dgram_socket create_socket_perms;
|
|
|
|
allow policykit_resolve_t self:unix_stream_socket create_stream_socket_perms;
|
|
|
|
|
|
|
|
policykit_domtrans_auth(policykit_resolve_t)
|
|
|
|
|
|
|
|
read_files_pattern(policykit_resolve_t, policykit_reload_t, policykit_reload_t)
|
|
|
|
|
|
|
|
read_files_pattern(policykit_resolve_t, policykit_var_lib_t, policykit_var_lib_t)
|
|
|
|
|
|
|
|
can_exec(policykit_resolve_t, policykit_resolve_exec_t)
|
|
|
|
corecmd_search_bin(policykit_resolve_t)
|
|
|
|
|
|
|
|
files_read_etc_files(policykit_resolve_t)
|
|
|
|
files_read_usr_files(policykit_resolve_t)
|
|
|
|
|
|
|
|
mcs_ptrace_all(policykit_resolve_t)
|
|
|
|
|
|
|
|
auth_use_nsswitch(policykit_resolve_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(policykit_resolve_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(policykit_resolve_t)
|
|
|
|
|
|
|
|
userdom_read_all_users_state(policykit_resolve_t)
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
dbus_system_bus_client(policykit_resolve_t)
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
consolekit_dbus_chat(policykit_resolve_t)
|
|
|
|
')
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
kernel_search_proc(policykit_resolve_t)
|
|
|
|
hal_read_state(policykit_resolve_t)
|
|
|
|
')
|
|
|
|
|