policy_module(consolekit, 1.13.0) ######################################## # # Declarations # type consolekit_t; type consolekit_exec_t; init_daemon_domain(consolekit_t, consolekit_exec_t) type consolekit_log_t; logging_log_file(consolekit_log_t) type consolekit_tmpfs_t; files_tmpfs_file(consolekit_tmpfs_t) type consolekit_unit_t; init_unit_file(consolekit_unit_t) type consolekit_var_run_t; files_pid_file(consolekit_var_run_t) init_daemon_pid_file(consolekit_var_run_t, dir, "ConsoleKit") ######################################## # # Local policy # allow consolekit_t self:capability { chown dac_override dac_read_search fowner setgid setuid sys_admin sys_nice sys_ptrace sys_tty_config }; allow consolekit_t self:process { getsched signal setfscreate }; allow consolekit_t self:fifo_file rw_fifo_file_perms; allow consolekit_t self:unix_stream_socket { accept listen }; create_files_pattern(consolekit_t, consolekit_log_t, consolekit_log_t) append_files_pattern(consolekit_t, consolekit_log_t, consolekit_log_t) read_files_pattern(consolekit_t, consolekit_log_t, consolekit_log_t) setattr_files_pattern(consolekit_t, consolekit_log_t, consolekit_log_t) logging_log_filetrans(consolekit_t, consolekit_log_t, file) manage_dirs_pattern(consolekit_t, consolekit_var_run_t, consolekit_var_run_t) manage_files_pattern(consolekit_t, consolekit_var_run_t, consolekit_var_run_t) manage_fifo_files_pattern(consolekit_t, consolekit_var_run_t, consolekit_var_run_t) files_pid_filetrans(consolekit_t, consolekit_var_run_t, { dir file }) kernel_read_system_state(consolekit_t) corenet_all_recvfrom_unlabeled(consolekit_t) corenet_all_recvfrom_netlabel(consolekit_t) corenet_tcp_sendrecv_generic_if(consolekit_t) corenet_tcp_sendrecv_generic_node(consolekit_t) corecmd_exec_bin(consolekit_t) corecmd_exec_shell(consolekit_t) dev_read_urand(consolekit_t) dev_rw_sysfs(consolekit_t) dev_setattr_all_chr_files(consolekit_t) domain_read_all_domains_state(consolekit_t) domain_use_interactive_fds(consolekit_t) domain_dontaudit_ptrace_all_domains(consolekit_t) files_read_usr_files(consolekit_t) files_read_var_lib_files(consolekit_t) files_search_all_mountpoints(consolekit_t) files_purge_tmp(consolekit_t) fs_list_inotifyfs(consolekit_t) fs_mount_tmpfs(consolekit_t) fs_unmount_tmpfs(consolekit_t) fs_relabelfrom_tmpfs(consolekit_t) mcs_ptrace_all(consolekit_t) seutil_libselinux_linked(consolekit_t) seutil_read_file_contexts(consolekit_t) term_use_all_terms(consolekit_t) auth_use_nsswitch(consolekit_t) auth_manage_pam_console_data(consolekit_t) auth_write_login_records(consolekit_t) auth_create_pam_console_data_dirs(consolekit_t) auth_pid_filetrans_pam_var_console(consolekit_t, dir, "console") logging_send_syslog_msg(consolekit_t) logging_send_audit_msgs(consolekit_t) miscfiles_read_localization(consolekit_t) userdom_dontaudit_read_user_home_content_files(consolekit_t) userdom_read_user_tmp_files(consolekit_t) userdom_manage_user_runtime_root_dirs(consolekit_t) userdom_manage_user_runtime_dirs(consolekit_t) userdom_mounton_user_runtime_dirs(consolekit_t) userdom_relabelto_user_runtime_dirs(consolekit_t) userdom_pid_filetrans_user_runtime_root(consolekit_t, dir, "user") userdom_user_runtime_root_filetrans_user_runtime(consolekit_t, dir) tunable_policy(`use_nfs_home_dirs',` fs_read_nfs_files(consolekit_t) ') tunable_policy(`use_samba_home_dirs',` fs_read_cifs_files(consolekit_t) ') optional_policy(` cgmanager_stream_connect(consolekit_t) ') optional_policy(` dbus_read_lib_files(consolekit_t) dbus_system_domain(consolekit_t, consolekit_exec_t) optional_policy(` hal_dbus_chat(consolekit_t) ') optional_policy(` policykit_dbus_chat(consolekit_t) ') optional_policy(` rpm_dbus_chat(consolekit_t) ') optional_policy(` unconfined_dbus_chat(consolekit_t) ') ') optional_policy(` devicekit_manage_log_files(consolekit_t) ') optional_policy(` hal_ptrace(consolekit_t) ') optional_policy(` networkmanager_append_log_files(consolekit_t) ') optional_policy(` policykit_domtrans_auth(consolekit_t) policykit_read_lib(consolekit_t) policykit_read_reload(consolekit_t) ') optional_policy(` shutdown_domtrans(consolekit_t) ') optional_policy(` corenet_sendrecv_xserver_client_packets(consolekit_t) corenet_tcp_connect_xserver_port(consolekit_t) corenet_tcp_sendrecv_xserver_port(consolekit_t) xserver_non_drawing_client(consolekit_t) xserver_read_xdm_pid(consolekit_t) xserver_read_user_xauth(consolekit_t) xserver_stream_connect(consolekit_t) xserver_user_x_domain_template(consolekit, consolekit_t, consolekit_tmpfs_t) ') optional_policy(` udev_domtrans(consolekit_t) udev_read_db(consolekit_t) udev_read_pid_files(consolekit_t) udev_signal(consolekit_t) ') optional_policy(` unconfined_stream_connect(consolekit_t) ')