From: sven.vermeulen@siphos.be (Sven Vermeulen) Date: Fri, 19 Oct 2012 20:51:23 +0200 Subject: [refpolicy] [PATCH 1/3] Introduce logging_getattr_all_logs interface In-Reply-To: <1350672685-14472-1-git-send-email-sven.vermeulen@siphos.be> References: <1350672685-14472-1-git-send-email-sven.vermeulen@siphos.be> Message-ID: <1350672685-14472-2-git-send-email-sven.vermeulen@siphos.be> To: refpolicy@oss.tresys.com List-Id: refpolicy.oss.tresys.com Support the logging_getattr_all_logs interface, which will be used by applications responsible for reviewing the state of log files (without needing to read them), such as the fail2ban-client application. Signed-off-by: Sven Vermeulen --- policy/modules/system/logging.if | 20 +++++++++++++++++++- 1 files changed, 19 insertions(+), 1 deletions(-) diff --git a/policy/modules/system/logging.if b/policy/modules/system/logging.if index 321bb13..be20dca 100644 --- a/policy/modules/system/logging.if +++ b/policy/modules/system/logging.if @@ -705,7 +705,7 @@ interface(`logging_setattr_all_log_dirs',` ######################################## ## -## Do not audit attempts to get the atttributes +## Do not audit attempts to get the attributes ## of any log files. ## ## @@ -724,6 +724,24 @@ interface(`logging_dontaudit_getattr_all_logs',` ######################################## ## +## Read the atttributes of any log file +## +## +## +## Domain allowed access +## +## +# +interface(`logging_getattr_all_logs',` + gen_require(` + attribute logfile; + ') + + allow $1 logfile:file getattr; +') + +######################################## +## ## Append to all log files. ## ## -- 1.7.8.6