From: sven.vermeulen@siphos.be (Sven Vermeulen) Date: Wed, 25 Jul 2012 12:58:38 +0200 Subject: [refpolicy] [PATCH 2/2] Introduce interfaces for mysql /run support In-Reply-To: <1343213918-3539-1-git-send-email-sven.vermeulen@siphos.be> References: <1343213918-3539-1-git-send-email-sven.vermeulen@siphos.be> Message-ID: <1343213918-3539-3-git-send-email-sven.vermeulen@siphos.be> To: refpolicy@oss.tresys.com List-Id: refpolicy.oss.tresys.com To allow the mysql init scripts to create /run/mysqld, we need to include two interfaces from mysql: one to support the file transition towards mysqld_var_run_t, and one to allow the init scripts to create mysqld_var_run_t-labeled directories Signed-off-by: Sven Vermeulen --- mysql.if | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 47 insertions(+), 0 deletions(-) diff --git a/mysql.if b/mysql.if index e9c0982..4346735 100644 --- a/mysql.if +++ b/mysql.if @@ -311,6 +311,53 @@ interface(`mysql_search_pid_files',` search_dirs_pattern($1, mysqld_var_run_t, mysqld_var_run_t) ') +####################################### +## +## Automatically use the MySQL run label for created resources in the +## generic run location(s). +## +## +## +## Domain allowed to have automatic transitioning +## +## +## +## +## Resource class for which an automatic transition should occur +## +## +## +## +## The name of the resource being created +## +## +# +interface(`mysql_generic_run_filetrans_pid',` + gen_require(` + type mysqld_var_run_t; + ') + + files_pid_filetrans($1, mysqld_var_run_t, $2, $3) +') + +####################################### +## +## Create MySQLd run directories +## +## +## +## Domain allowed access +## +## +# +interface(`mysql_create_run_dirs',` + gen_require(` + type mysqld_var_run_t; + ') + + create_dirs_pattern($1, mysqld_var_run_t, mysqld_var_run_t) +') + ######################################## ## ## All of the rules required to administrate an mysql environment -- 1.7.8.6