2007-03-19 18:01:15 +00:00
|
|
|
|
2007-10-05 18:00:55 +00:00
|
|
|
policy_module(consolekit,1.2.1)
|
2007-03-19 18:01:15 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type consolekit_t;
|
|
|
|
type consolekit_exec_t;
|
|
|
|
init_daemon_domain(consolekit_t, consolekit_exec_t)
|
|
|
|
|
2007-04-11 14:04:35 +00:00
|
|
|
# pid files
|
|
|
|
type consolekit_var_run_t;
|
|
|
|
files_pid_file(consolekit_var_run_t)
|
|
|
|
|
2007-03-19 18:01:15 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# consolekit local policy
|
|
|
|
#
|
|
|
|
|
2007-05-03 14:15:38 +00:00
|
|
|
allow consolekit_t self:capability { setuid setgid sys_tty_config dac_override sys_nice sys_ptrace };
|
2007-04-11 14:04:35 +00:00
|
|
|
allow consolekit_t self:process { getsched signal };
|
2007-03-19 18:01:15 +00:00
|
|
|
allow consolekit_t self:fifo_file rw_fifo_file_perms;
|
|
|
|
allow consolekit_t self:unix_stream_socket create_stream_socket_perms;
|
2007-05-03 14:15:38 +00:00
|
|
|
allow consolekit_t self:unix_dgram_socket create_socket_perms;
|
2007-03-19 18:01:15 +00:00
|
|
|
|
2007-04-11 14:04:35 +00:00
|
|
|
# pid file
|
|
|
|
manage_files_pattern(consolekit_t,consolekit_var_run_t,consolekit_var_run_t)
|
|
|
|
files_pid_filetrans(consolekit_t,consolekit_var_run_t, file)
|
|
|
|
|
2007-05-03 14:15:38 +00:00
|
|
|
kernel_read_system_state(consolekit_t)
|
|
|
|
|
|
|
|
corecmd_exec_bin(consolekit_t)
|
|
|
|
|
2007-03-19 18:01:15 +00:00
|
|
|
dev_read_urand(consolekit_t)
|
|
|
|
dev_read_sysfs(consolekit_t)
|
|
|
|
|
|
|
|
domain_read_all_domains_state(consolekit_t)
|
|
|
|
domain_use_interactive_fds(consolekit_t)
|
|
|
|
|
|
|
|
files_read_etc_files(consolekit_t)
|
2007-04-11 20:02:59 +00:00
|
|
|
# needs to read /var/lib/dbus/machine-id
|
|
|
|
files_read_var_lib_files(consolekit_t)
|
2007-03-19 18:01:15 +00:00
|
|
|
|
2007-05-03 14:15:38 +00:00
|
|
|
fs_list_inotifyfs(consolekit_t)
|
|
|
|
|
|
|
|
term_use_all_terms(consolekit_t)
|
2007-04-11 14:04:35 +00:00
|
|
|
|
2007-03-19 18:01:15 +00:00
|
|
|
libs_use_ld_so(consolekit_t)
|
|
|
|
libs_use_shared_libs(consolekit_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(consolekit_t)
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
dbus_system_bus_client_template(consolekit, consolekit_t)
|
|
|
|
dbus_send_system_bus(consolekit_t)
|
|
|
|
dbus_connect_system_bus(consolekit_t)
|
|
|
|
|
|
|
|
hal_dbus_chat(consolekit_t)
|
2007-04-11 14:04:35 +00:00
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
unconfined_dbus_chat(consolekit_t)
|
|
|
|
')
|
2007-03-19 18:01:15 +00:00
|
|
|
')
|
2007-05-03 14:15:38 +00:00
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
xserver_read_all_users_xauth(consolekit_t)
|
|
|
|
xserver_stream_connect_xdm_xserver(consolekit_t)
|
|
|
|
')
|