All of lore.kernel.org
 help / color / mirror / Atom feed
* [refpolicy] [PATCH v2 1/1] Fail2ban client checks state of log files before telling the server
@ 2012-10-30 18:41 Sven Vermeulen
  2012-10-30 18:55 ` Dominick Grift
  0 siblings, 1 reply; 2+ messages in thread
From: Sven Vermeulen @ 2012-10-30 18:41 UTC (permalink / raw)
  To: refpolicy

When a (re)configuration occurs, fail2ban-client invokes an internal script
called jailreader which will look through the configured log files and check
their state before informing the server that these log files need to be
"watched".

During this operation, fail2ban-client requires dac_read_search capability (in
case the log file/directory isn't owned by the same user that fail2ban-client
runs as, which is a very common case) as well as getattr rights on all log files
(and search privileges on the directories).

Updated since previous patch with correct name for search_all_logs

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
---
 fail2ban.te |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/fail2ban.te b/fail2ban.te
index c7c6020..c40631f 100644
--- a/fail2ban.te
+++ b/fail2ban.te
@@ -124,6 +124,7 @@ optional_policy(`
 # Client Local policy
 #
 
+allow fail2ban_client_t self:capability dac_read_search;
 allow fail2ban_client_t self:unix_stream_socket { create connect write read };
 
 domtrans_pattern(fail2ban_client_t, fail2ban_exec_t, fail2ban_t)
@@ -140,6 +141,9 @@ files_read_etc_files(fail2ban_client_t)
 files_read_usr_files(fail2ban_client_t)
 files_search_pids(fail2ban_client_t)
 
+logging_getattr_all_logs(fail2ban_client_t)
+logging_search_all_logs(fail2ban_client_t)
+
 miscfiles_read_localization(fail2ban_client_t)
 
 userdom_dontaudit_search_user_home_dirs(fail2ban_client_t)
-- 
1.7.8.6

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [refpolicy] [PATCH v2 1/1] Fail2ban client checks state of log files before telling the server
  2012-10-30 18:41 [refpolicy] [PATCH v2 1/1] Fail2ban client checks state of log files before telling the server Sven Vermeulen
@ 2012-10-30 18:55 ` Dominick Grift
  0 siblings, 0 replies; 2+ messages in thread
From: Dominick Grift @ 2012-10-30 18:55 UTC (permalink / raw)
  To: refpolicy



On Tue, 2012-10-30 at 19:41 +0100, Sven Vermeulen wrote:
> When a (re)configuration occurs, fail2ban-client invokes an internal script
> called jailreader which will look through the configured log files and check
> their state before informing the server that these log files need to be
> "watched".
> 
> During this operation, fail2ban-client requires dac_read_search capability (in
> case the log file/directory isn't owned by the same user that fail2ban-client
> runs as, which is a very common case) as well as getattr rights on all log files
> (and search privileges on the directories).
> 
> Updated since previous patch with correct name for search_all_logs
> 
> Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
> ---
>  fail2ban.te |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/fail2ban.te b/fail2ban.te
> index c7c6020..c40631f 100644
> --- a/fail2ban.te
> +++ b/fail2ban.te
> @@ -124,6 +124,7 @@ optional_policy(`
>  # Client Local policy
>  #
>  
> +allow fail2ban_client_t self:capability dac_read_search;
>  allow fail2ban_client_t self:unix_stream_socket { create connect write read };
>  
>  domtrans_pattern(fail2ban_client_t, fail2ban_exec_t, fail2ban_t)
> @@ -140,6 +141,9 @@ files_read_etc_files(fail2ban_client_t)
>  files_read_usr_files(fail2ban_client_t)
>  files_search_pids(fail2ban_client_t)
>  
> +logging_getattr_all_logs(fail2ban_client_t)
> +logging_search_all_logs(fail2ban_client_t)
> +
>  miscfiles_read_localization(fail2ban_client_t)
>  
>  userdom_dontaudit_search_user_home_dirs(fail2ban_client_t)

Merged, thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-30 18:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-30 18:41 [refpolicy] [PATCH v2 1/1] Fail2ban client checks state of log files before telling the server Sven Vermeulen
2012-10-30 18:55 ` Dominick Grift

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.