From 5d5ea8d00292e164fcbedf6ca7cff4602f86c060 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Mon, 28 Nov 2005 19:06:22 +0000 Subject: [PATCH] add irqbalance --- refpolicy/Changelog | 1 + .../policy/modules/services/irqbalance.fc | 2 + .../policy/modules/services/irqbalance.if | 1 + .../policy/modules/services/irqbalance.te | 66 +++++++++++++++++++ 4 files changed, 70 insertions(+) create mode 100644 refpolicy/policy/modules/services/irqbalance.fc create mode 100644 refpolicy/policy/modules/services/irqbalance.if create mode 100644 refpolicy/policy/modules/services/irqbalance.te diff --git a/refpolicy/Changelog b/refpolicy/Changelog index 32393e1b6..172e64a1b 100644 --- a/refpolicy/Changelog +++ b/refpolicy/Changelog @@ -19,6 +19,7 @@ dbskk dovecot distcc + irqbalance lpd networkmanager pegasus diff --git a/refpolicy/policy/modules/services/irqbalance.fc b/refpolicy/policy/modules/services/irqbalance.fc new file mode 100644 index 000000000..38310757b --- /dev/null +++ b/refpolicy/policy/modules/services/irqbalance.fc @@ -0,0 +1,2 @@ + +/usr/sbin/irqbalance -- gen_context(system_u:object_r:irqbalance_exec_t,s0) diff --git a/refpolicy/policy/modules/services/irqbalance.if b/refpolicy/policy/modules/services/irqbalance.if new file mode 100644 index 000000000..058fb75ca --- /dev/null +++ b/refpolicy/policy/modules/services/irqbalance.if @@ -0,0 +1 @@ +## IRQ balancing daemon diff --git a/refpolicy/policy/modules/services/irqbalance.te b/refpolicy/policy/modules/services/irqbalance.te new file mode 100644 index 000000000..6dd863b42 --- /dev/null +++ b/refpolicy/policy/modules/services/irqbalance.te @@ -0,0 +1,66 @@ + +policy_module(irqbalance,1.0.0) + +######################################## +# +# Declarations +# + +type irqbalance_t; +type irqbalance_exec_t; +init_daemon_domain(irqbalance_t,irqbalance_exec_t) + +type irqbalance_var_run_t; +files_pid_file(irqbalance_var_run_t) + +######################################## +# +# Local policy +# + +dontaudit irqbalance_t self:capability sys_tty_config; +allow irqbalance_t self:process signal_perms; + +allow irqbalance_t irqbalance_var_run_t:file create_file_perms; +allow irqbalance_t irqbalance_var_run_t:dir rw_dir_perms; +files_create_pid(irqbalance_t,irqbalance_var_run_t) + +kernel_read_system_state(irqbalance_t) +kernel_read_kernel_sysctl(irqbalance_t) +kernel_rw_irq_sysctl(irqbalance_t) + +dev_read_sysfs(irqbalance_t) + +fs_getattr_all_fs(irqbalance_t) +fs_search_auto_mountpoints(irqbalance_t) + +term_dontaudit_use_console(irqbalance_t) + +domain_use_wide_inherit_fd(irqbalance_t) + +init_use_fd(irqbalance_t) +init_use_script_pty(irqbalance_t) + +libs_use_ld_so(irqbalance_t) +libs_use_shared_libs(irqbalance_t) + +logging_send_syslog_msg(irqbalance_t) + +miscfiles_read_localization(irqbalance_t) + +userdom_dontaudit_use_unpriv_user_fd(irqbalance_t) +userdom_dontaudit_search_sysadm_home_dir(irqbalance_t) + +ifdef(`targeted_policy',` + term_dontaudit_use_unallocated_tty(irqbalance_t) + term_dontaudit_use_generic_pty(irqbalance_t) + files_dontaudit_read_root_file(irqbalance_t) +') + +optional_policy(`selinuxutil',` + seutil_sigchld_newrole(irqbalance_t) +') + +optional_policy(`udev',` + udev_read_db(irqbalance_t) +')