Chris PeBenito c224d9
Chris PeBenito 116c1d
policy_module(consolekit,1.2.0)
Chris PeBenito c224d9
Chris PeBenito c224d9
########################################
Chris PeBenito c224d9
#
Chris PeBenito c224d9
# Declarations
Chris PeBenito c224d9
#
Chris PeBenito c224d9
Chris PeBenito c224d9
type consolekit_t;
Chris PeBenito c224d9
type consolekit_exec_t;
Chris PeBenito c224d9
init_daemon_domain(consolekit_t, consolekit_exec_t)
Chris PeBenito c224d9
Chris PeBenito 99064c
# pid files
Chris PeBenito 99064c
type consolekit_var_run_t;
Chris PeBenito 99064c
files_pid_file(consolekit_var_run_t)
Chris PeBenito 99064c
Chris PeBenito c224d9
########################################
Chris PeBenito c224d9
#
Chris PeBenito c224d9
# consolekit local policy
Chris PeBenito c224d9
#
Chris PeBenito c224d9
Chris PeBenito 4967aa
allow consolekit_t self:capability { setuid setgid sys_tty_config dac_override sys_nice sys_ptrace };
Chris PeBenito 99064c
allow consolekit_t self:process { getsched signal };
Chris PeBenito c224d9
allow consolekit_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito c224d9
allow consolekit_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 4967aa
allow consolekit_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito c224d9
Chris PeBenito 99064c
# pid file
Chris PeBenito 99064c
manage_files_pattern(consolekit_t,consolekit_var_run_t,consolekit_var_run_t)
Chris PeBenito 99064c
files_pid_filetrans(consolekit_t,consolekit_var_run_t, file)
Chris PeBenito 99064c
Chris PeBenito 4967aa
kernel_read_system_state(consolekit_t)
Chris PeBenito 4967aa
Chris PeBenito 4967aa
corecmd_exec_bin(consolekit_t)
Chris PeBenito 4967aa
Chris PeBenito c224d9
dev_read_urand(consolekit_t)
Chris PeBenito c224d9
dev_read_sysfs(consolekit_t)
Chris PeBenito c224d9
Chris PeBenito c224d9
domain_read_all_domains_state(consolekit_t)
Chris PeBenito c224d9
domain_use_interactive_fds(consolekit_t)
Chris PeBenito c224d9
Chris PeBenito c224d9
files_read_etc_files(consolekit_t)
Chris PeBenito 4029f1
# needs to read /var/lib/dbus/machine-id
Chris PeBenito 4029f1
files_read_var_lib_files(consolekit_t)
Chris PeBenito c224d9
Chris PeBenito 4967aa
fs_list_inotifyfs(consolekit_t)
Chris PeBenito 4967aa
Chris PeBenito 4967aa
term_use_all_terms(consolekit_t)
Chris PeBenito 99064c
Chris PeBenito c224d9
libs_use_ld_so(consolekit_t)
Chris PeBenito c224d9
libs_use_shared_libs(consolekit_t)
Chris PeBenito c224d9
Chris PeBenito c224d9
miscfiles_read_localization(consolekit_t)
Chris PeBenito c224d9
Chris PeBenito c224d9
optional_policy(`
Chris PeBenito c224d9
	dbus_system_bus_client_template(consolekit, consolekit_t)
Chris PeBenito c224d9
	dbus_send_system_bus(consolekit_t)
Chris PeBenito c224d9
	dbus_connect_system_bus(consolekit_t)
Chris PeBenito c224d9
Chris PeBenito c224d9
	hal_dbus_chat(consolekit_t)
Chris PeBenito 99064c
Chris PeBenito 99064c
	optional_policy(`
Chris PeBenito 99064c
		unconfined_dbus_chat(consolekit_t)
Chris PeBenito 99064c
	')
Chris PeBenito c224d9
')
Chris PeBenito 4967aa
Chris PeBenito 4967aa
optional_policy(`
Chris PeBenito 4967aa
	xserver_read_all_users_xauth(consolekit_t)
Chris PeBenito 4967aa
	xserver_stream_connect_xdm_xserver(consolekit_t)
Chris PeBenito 4967aa
')