All of lore.kernel.org
 help / color / mirror / Atom feed
From: sven.vermeulen@siphos.be (Sven Vermeulen)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH v5 1/5] Support log location for init script logging
Date: Thu, 12 Jul 2012 21:24:41 +0200	[thread overview]
Message-ID: <1342121085-2765-2-git-send-email-sven.vermeulen@siphos.be> (raw)
In-Reply-To: <1342121085-2765-1-git-send-email-sven.vermeulen@siphos.be>

Recent init script packages allow for logging init script progress (service
start/stop state information, sometimes even duration, etc.) so we introduce an
initrc_var_log_t logtype and allow initrc_t to manage this.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
---
 policy/modules/system/init.te |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/policy/modules/system/init.te b/policy/modules/system/init.te
index 5fb9683..953d586 100644
--- a/policy/modules/system/init.te
+++ b/policy/modules/system/init.te
@@ -74,6 +74,9 @@ files_type(initrc_state_t)
 type initrc_tmp_t;
 files_tmp_file(initrc_tmp_t)
 
+type initrc_var_log_t;
+logging_log_file(initrc_var_log_t)
+
 type initrc_var_run_t;
 files_pid_file(initrc_var_run_t)
 
@@ -255,6 +258,10 @@ manage_dirs_pattern(initrc_t, initrc_tmp_t, initrc_tmp_t)
 manage_lnk_files_pattern(initrc_t, initrc_tmp_t, initrc_tmp_t)
 files_tmp_filetrans(initrc_t, initrc_tmp_t, { file dir })
 
+manage_dirs_pattern(initrc_t, initrc_var_log_t, initrc_var_log_t)
+manage_files_pattern(initrc_t, initrc_var_log_t, initrc_var_log_t)
+logging_log_filetrans(initrc_t, initrc_var_log_t, dir)
+
 init_write_initctl(initrc_t)
 
 kernel_read_system_state(initrc_t)
-- 
1.7.8.6

  reply	other threads:[~2012-07-12 19:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-12 19:24 [refpolicy] [PATCH v5 0/5] Updates on init scripts and udev (mainly /run related) Sven Vermeulen
2012-07-12 19:24 ` Sven Vermeulen [this message]
2012-07-12 19:24 ` [refpolicy] [PATCH v5 2/5] Supporting interfaces for the /run changes Sven Vermeulen
2012-07-12 19:24 ` [refpolicy] [PATCH v5 3/5] Allow init scripts to populate /run location Sven Vermeulen
2012-07-12 19:24 ` [refpolicy] [PATCH v5 4/5] Prepare udev interfaces for /run usage Sven Vermeulen
2012-07-12 19:24 ` [refpolicy] [PATCH v5 5/5] Allow init scripts to create and manage (udev) /run location Sven Vermeulen
2012-07-24 13:09 ` [refpolicy] [PATCH v5 0/5] Updates on init scripts and udev (mainly /run related) Christopher J. PeBenito

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1342121085-2765-2-git-send-email-sven.vermeulen@siphos.be \
    --to=sven.vermeulen@siphos.be \
    --cc=refpolicy@oss.tresys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.