## Framework for facilitating multiple user sessions on desktops. ######################################## ## ## Execute a domain transition to run consolekit. ## ## ## ## Domain allowed to transition. ## ## # interface(`consolekit_domtrans',` gen_require(` type consolekit_t, consolekit_exec_t; ') corecmd_search_bin($1) domtrans_pattern($1, consolekit_exec_t, consolekit_t) ') ######################################## ## ## Send and receive messages from ## consolekit over dbus. ## ## ## ## Domain allowed access. ## ## # interface(`consolekit_dbus_chat',` gen_require(` type consolekit_t; class dbus send_msg; ') allow $1 consolekit_t:dbus send_msg; allow consolekit_t $1:dbus send_msg; ') ######################################## ## ## Use consolekit inhibit locks. ## ## The program gets passed an FD to a fifo_file to hold. ## When the application is done with the lock, it closes the FD. ## Implements this API: https://www.freedesktop.org/wiki/Software/systemd/inhibit/ ## ## ## ## Domain allowed access. ## ## # interface(`consolekit_use_inhibit_lock',` gen_require(` type consolekit_t, consolekit_runtime_t; ') allow $1 consolekit_t:fd use; allow $1 consolekit_runtime_t:fifo_file rw_inherited_fifo_file_perms; ') ######################################## ## ## Read consolekit log files. ## ## ## ## Domain allowed access. ## ## # interface(`consolekit_read_log',` gen_require(` type consolekit_log_t; ') read_files_pattern($1, consolekit_log_t, consolekit_log_t) logging_search_logs($1) ') ######################################## ## ## Create, read, write, and delete ## consolekit log files. ## ## ## ## Domain allowed access. ## ## # interface(`consolekit_manage_log',` gen_require(` type consolekit_log_t; ') manage_files_pattern($1, consolekit_log_t, consolekit_log_t) files_search_pids($1) ') ######################################## ## ## Read consolekit PID files. ## ## ## ## Domain allowed access. ## ## # interface(`consolekit_read_pid_files',` gen_require(` type consolekit_runtime_t; ') files_search_pids($1) allow $1 consolekit_runtime_t:dir list_dir_perms; read_files_pattern($1, consolekit_runtime_t, consolekit_runtime_t) ') ######################################## ## ## Watch consolekit runtime dir. ## ## ## ## Domain allowed access. ## ## # interface(`consolekit_watch_runtime_dir',` gen_require(` type consolekit_runtime_t; ') allow $1 consolekit_runtime_t:dir watch; ')