From: sven.vermeulen@siphos.be (Sven Vermeulen) Date: Sat, 25 Aug 2012 20:26:39 +0200 Subject: [refpolicy] [PATCH v4 4/4] Allow initrc_t to create run dirs for contrib modules In-Reply-To: <20120825182417.GA23427@siphos.be> References: <20120825182417.GA23427@siphos.be> Message-ID: <20120825182639.GE23427@siphos.be> To: refpolicy@oss.tresys.com List-Id: refpolicy.oss.tresys.com Use the init_daemon_run_dir interface in order to allow initrc_t to create the run dirs of the asterisk, consolekit, dbus, mysql, nscd and tor services. Signed-off-by: Sven Vermeulen --- asterisk.te | 1 + consolekit.te | 1 + dbus.te | 1 + mysql.te | 1 + nscd.te | 1 + tor.te | 1 + 6 files changed, 6 insertions(+), 0 deletions(-) diff --git a/asterisk.te b/asterisk.te index 159610b..9907175 100644 --- a/asterisk.te +++ b/asterisk.te @@ -33,6 +33,7 @@ files_type(asterisk_var_lib_t) type asterisk_var_run_t; files_pid_file(asterisk_var_run_t) +init_daemon_run_dir(asterisk_var_run_t, "asterisk") ######################################## # diff --git a/consolekit.te b/consolekit.te index 6f2896d..516328a 100644 --- a/consolekit.te +++ b/consolekit.te @@ -14,6 +14,7 @@ logging_log_file(consolekit_log_t) type consolekit_var_run_t; files_pid_file(consolekit_var_run_t) +init_daemon_run_dir(consolekit_var_run_t, "ConsoleKit") ######################################## # diff --git a/dbus.te b/dbus.te index 625cb32..05f2b89 100644 --- a/dbus.te +++ b/dbus.te @@ -35,6 +35,7 @@ files_type(system_dbusd_var_lib_t) type system_dbusd_var_run_t; files_pid_file(system_dbusd_var_run_t) +init_daemon_run_dir(system_dbusd_var_run_t, "dbus") ifdef(`enable_mcs',` init_ranged_system_domain(system_dbusd_t, dbusd_exec_t, s0 - mcs_systemhigh) diff --git a/mysql.te b/mysql.te index 1cf05a3..d4206c9 100644 --- a/mysql.te +++ b/mysql.te @@ -22,6 +22,7 @@ init_daemon_domain(mysqld_safe_t, mysqld_safe_exec_t) type mysqld_var_run_t; files_pid_file(mysqld_var_run_t) +init_daemon_run_dir(mysqld_var_run_t, "mysqld") type mysqld_db_t; files_type(mysqld_db_t) diff --git a/nscd.te b/nscd.te index 7936e09..de5fdc1 100644 --- a/nscd.te +++ b/nscd.te @@ -13,6 +13,7 @@ gen_require(` # ordering problem with loadable modules type nscd_var_run_t; files_pid_file(nscd_var_run_t) +init_daemon_run_dir(nscd_var_run_t, "nscd") # nscd is both the client program and the daemon. type nscd_t; diff --git a/tor.te b/tor.te index c842cad..8cdfd7b 100644 --- a/tor.te +++ b/tor.te @@ -35,6 +35,7 @@ logging_log_file(tor_var_log_t) # pid files type tor_var_run_t; files_pid_file(tor_var_run_t) +init_daemon_run_dir(tor_var_run_t, "tor") ######################################## # -- 1.7.8.6