From f4962ab15b4274c24918c8607466e0876eed7339 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Jul 27 2009 13:09:00 +0000 Subject: add cpufreqselector from dan --- diff --git a/Changelog b/Changelog index a48f9c9..1bfa271 100644 --- a/Changelog +++ b/Changelog @@ -21,6 +21,7 @@ - Add kernel_service access vectors, from Stephen Smalley. - Added modules: certmaster (Dan Walsh) + cpufreqselector (Dan Walsh) git (Dan Walsh) gpsd (Miroslav Grepl) guest (Dan Walsh) diff --git a/policy/modules/apps/cpufreqselector.fc b/policy/modules/apps/cpufreqselector.fc new file mode 100644 index 0000000..b187f0f --- /dev/null +++ b/policy/modules/apps/cpufreqselector.fc @@ -0,0 +1 @@ +/usr/bin/cpufreq-selector -- gen_context(system_u:object_r:cpufreqselector_exec_t,s0) diff --git a/policy/modules/apps/cpufreqselector.if b/policy/modules/apps/cpufreqselector.if new file mode 100644 index 0000000..ed94975 --- /dev/null +++ b/policy/modules/apps/cpufreqselector.if @@ -0,0 +1 @@ +## Command-line CPU frequency settings. diff --git a/policy/modules/apps/cpufreqselector.te b/policy/modules/apps/cpufreqselector.te new file mode 100644 index 0000000..434cc9f --- /dev/null +++ b/policy/modules/apps/cpufreqselector.te @@ -0,0 +1,42 @@ + +policy_module(cpufreqselector, 1.0.0) + +######################################## +# +# Declarations +# + +type cpufreqselector_t; +type cpufreqselector_exec_t; +application_domain(cpufreqselector_t, cpufreqselector_exec_t) + +######################################## +# +# cpufreq-selector local policy +# + +allow cpufreqselector_t self:capability { sys_nice sys_ptrace }; +allow cpufreqselector_t self:fifo_file rw_fifo_file_perms; + +files_read_etc_files(cpufreqselector_t) +files_read_usr_files(cpufreqselector_t) + +corecmd_search_bin(cpufreqselector_t) + +dev_rw_sysfs(cpufreqselector_t) + +userdom_read_all_users_state(cpufreqselector_t) + +optional_policy(` + consolekit_dbus_chat(cpufreqselector_t) +') + +optional_policy(` + nscd_dontaudit_search_pid(cpufreqselector_t) +') + +optional_policy(` + policykit_domtrans_auth(cpufreqselector_t) + policykit_read_lib(cpufreqselector_t) + policykit_read_reload(cpufreqselector_t) +')