Chris PeBenito 29af4c
policy_module(consolekit, 1.6.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 80348b
type consolekit_log_t;
Chris PeBenito 4e7c0a
logging_log_file(consolekit_log_t)
Chris PeBenito 80348b
Chris PeBenito 99064c
type consolekit_var_run_t;
Chris PeBenito 99064c
files_pid_file(consolekit_var_run_t)
Chris PeBenito 99064c
Dan Walsh 3eaa99
type consolekit_tmpfs_t;
Dan Walsh 3eaa99
files_tmpfs_file(consolekit_tmpfs_t)
Dan Walsh 3eaa99
Chris PeBenito c224d9
########################################
Chris PeBenito c224d9
#
Chris PeBenito c224d9
# consolekit local policy
Chris PeBenito c224d9
#
Chris PeBenito c224d9
Chris PeBenito a3108c
allow consolekit_t self:capability { chown 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 80348b
manage_files_pattern(consolekit_t, consolekit_log_t, consolekit_log_t)
Chris PeBenito 80348b
logging_log_filetrans(consolekit_t, consolekit_log_t, file)
Chris PeBenito 80348b
Chris PeBenito 80348b
manage_dirs_pattern(consolekit_t, consolekit_var_run_t, consolekit_var_run_t)
Chris PeBenito 0bfccd
manage_files_pattern(consolekit_t, consolekit_var_run_t, consolekit_var_run_t)
Chris PeBenito 80348b
files_pid_filetrans(consolekit_t, consolekit_var_run_t, { file dir })
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 80348b
corecmd_exec_shell(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 80348b
domain_dontaudit_ptrace_all_domains(consolekit_t)
Chris PeBenito c224d9
Chris PeBenito c224d9
files_read_etc_files(consolekit_t)
Chris PeBenito 80348b
files_read_usr_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 4e7c0a
files_search_all_mountpoints(consolekit_t)
Chris PeBenito c224d9
Chris PeBenito 4967aa
fs_list_inotifyfs(consolekit_t)
Chris PeBenito 4967aa
Chris PeBenito 80348b
mcs_ptrace_all(consolekit_t)
Chris PeBenito 80348b
Chris PeBenito 4967aa
term_use_all_terms(consolekit_t)
Chris PeBenito 99064c
Chris PeBenito c0cf6e
auth_use_nsswitch(consolekit_t)
Chris PeBenito a3108c
auth_manage_pam_console_data(consolekit_t)
Chris PeBenito a3108c
auth_write_login_records(consolekit_t)
Chris PeBenito c0cf6e
Chris PeBenito 80348b
init_telinit(consolekit_t)
Chris PeBenito 80348b
init_rw_utmp(consolekit_t)
Chris PeBenito 80348b
Chris PeBenito 80348b
logging_send_syslog_msg(consolekit_t)
Chris PeBenito 4e7c0a
logging_send_audit_msgs(consolekit_t)
Chris PeBenito 80348b
Chris PeBenito c224d9
miscfiles_read_localization(consolekit_t)
Chris PeBenito c224d9
Dan Walsh 3eaa99
# consolekit needs to be able to ptrace all logged in users 
Dan Walsh 3eaa99
userdom_ptrace_all_users(consolekit_t)
Chris PeBenito 80348b
userdom_dontaudit_read_user_home_content_files(consolekit_t)
Dan Walsh 3eaa99
userdom_dontaudit_getattr_admin_home_files(consolekit_t)
Chris PeBenito 4e7c0a
userdom_read_user_tmp_files(consolekit_t)
Chris PeBenito 80348b
Chris PeBenito 80348b
hal_ptrace(consolekit_t)
Chris PeBenito 80348b
Chris PeBenito 80348b
tunable_policy(`use_nfs_home_dirs',`
Chris PeBenito a3108c
	fs_read_nfs_files(consolekit_t)
Chris PeBenito 80348b
')
Chris PeBenito 80348b
Chris PeBenito 80348b
tunable_policy(`use_samba_home_dirs',`
Chris PeBenito a3108c
	fs_read_cifs_files(consolekit_t)
Chris PeBenito 80348b
')
Chris PeBenito 80348b
Chris PeBenito c224d9
optional_policy(`
Dan Walsh 3eaa99
	cron_read_system_job_lib_files(consolekit_t)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
optional_policy(`
Chris PeBenito 4e7c0a
	dbus_system_domain(consolekit_t, consolekit_exec_t)
Chris PeBenito c224d9
Chris PeBenito 80348b
	optional_policy(`
Chris PeBenito 80348b
		hal_dbus_chat(consolekit_t)
Chris PeBenito 80348b
	')
Chris PeBenito 80348b
Chris PeBenito 80348b
	optional_policy(`
Chris PeBenito 80348b
		rpm_dbus_chat(consolekit_t)
Chris PeBenito 80348b
	')
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(`
Dan Walsh 3eaa99
	networkmanager_append_log(consolekit_t)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
optional_policy(`
Dominick Grift 68ac47
	policykit_dbus_chat(consolekit_t)
Chris PeBenito 4e7c0a
	policykit_domtrans_auth(consolekit_t)
Chris PeBenito 4e7c0a
	policykit_read_lib(consolekit_t)
Chris PeBenito 4e7c0a
	policykit_read_reload(consolekit_t)
Chris PeBenito 4e7c0a
')
Chris PeBenito 4e7c0a
Chris PeBenito 4e7c0a
optional_policy(`
Dan Walsh 3eaa99
	shutdown_domtrans(consolekit_t)
Dan Walsh 3eaa99
')
Chris PeBenito a3108c
Dan Walsh 3eaa99
optional_policy(`
Chris PeBenito 4e7c0a
	xserver_read_xdm_pid(consolekit_t)
Chris PeBenito 296273
	xserver_read_user_xauth(consolekit_t)
Chris PeBenito 6246e7
	xserver_non_drawing_client(consolekit_t)
Chris PeBenito 4e7c0a
	corenet_tcp_connect_xserver_port(consolekit_t)
Chris PeBenito a3108c
	xserver_stream_connect(consolekit_t)
Chris PeBenito a3108c
	xserver_user_x_domain_template(consolekit, consolekit_t, consolekit_tmpfs_t)
Chris PeBenito a3108c
')
Chris PeBenito a3108c
Chris PeBenito a3108c
optional_policy(`
Chris PeBenito a3108c
	udev_domtrans(consolekit_t)
Chris PeBenito a3108c
	udev_read_db(consolekit_t)
Chris PeBenito a3108c
	udev_signal(consolekit_t)
Chris PeBenito 4967aa
')
Chris PeBenito 80348b
Chris PeBenito 80348b
optional_policy(`
Chris PeBenito 80348b
	#reading .Xauthity
Dan Walsh 3eaa99
	unconfined_ptrace(consolekit_t)
Chris PeBenito 80348b
	unconfined_stream_connect(consolekit_t)
Chris PeBenito 80348b
')