All of lore.kernel.org
 help / color / mirror / Atom feed
From: cpebenito@tresys.com (Christopher J. PeBenito)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH 1/2] Snort policy updates
Date: Thu, 24 Apr 2014 12:57:01 -0400	[thread overview]
Message-ID: <5359425D.4080202@tresys.com> (raw)
In-Reply-To: <1398092903-6994-2-git-send-email-sven.vermeulen@siphos.be>

On 04/21/2014 11:08 AM, Sven Vermeulen wrote:
> When snort starts up, its init script creates the /var/run/snort directory.
> However, the policy did not have a file transition for this, which results
> in the /var/run/snort directory to be initrc_var_run_t.
> 
> By supporting a file transition to snort_var_run_t the PID file can be
> hosted inside its own directory as intended.

Merged.


> Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
> ---
>  snort.fc | 1 +
>  snort.te | 3 ++-
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/snort.fc b/snort.fc
> index 591b9a1..2b1ea6b 100644
> --- a/snort.fc
> +++ b/snort.fc
> @@ -10,3 +10,4 @@
>  /var/log/snort(/.*)?	gen_context(system_u:object_r:snort_log_t,s0)
>  
>  /var/run/snort.*	--	gen_context(system_u:object_r:snort_var_run_t,s0)
> +/var/run/snort(/.*)?	gen_context(system_u:object_r:snort_var_run_t,s0)
> diff --git a/snort.te b/snort.te
> index 1af72df..2d78724 100644
> --- a/snort.te
> +++ b/snort.te
> @@ -23,6 +23,7 @@ files_tmp_file(snort_tmp_t)
>  
>  type snort_var_run_t;
>  files_pid_file(snort_var_run_t)
> +init_daemon_run_dir(snort_var_run_t, "snort")
>  
>  ########################################
>  #
> @@ -43,9 +44,9 @@ allow snort_t snort_etc_t:file read_file_perms;
>  allow snort_t snort_etc_t:lnk_file read_lnk_file_perms;
>  
>  manage_dirs_pattern(snort_t, snort_log_t, snort_log_t)
> -append_files_pattern(snort_t, snort_log_t, snort_log_t)
>  create_files_pattern(snort_t, snort_log_t, snort_log_t)
>  setattr_files_pattern(snort_t, snort_log_t, snort_log_t)
> +write_files_pattern(snort_t, snort_log_t, snort_log_t)
>  logging_log_filetrans(snort_t, snort_log_t, { file dir })
>  
>  manage_dirs_pattern(snort_t, snort_tmp_t, snort_tmp_t)
 


-- 
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com

  reply	other threads:[~2014-04-24 16:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-21 15:08 [refpolicy] [PATCH v2 0/2] Minor updates on fcron and snort Sven Vermeulen
2014-04-21 15:08 ` [refpolicy] [PATCH 1/2] Snort policy updates Sven Vermeulen
2014-04-24 16:57   ` Christopher J. PeBenito [this message]
2014-04-21 15:08 ` [refpolicy] [PATCH 2/2] fcron socket support Sven Vermeulen
2014-04-24 16:58   ` Christopher J. PeBenito
  -- strict thread matches above, loose matches on Subject: below --
2014-04-20  8:55 [refpolicy] [PATCH 0/2] Minor updates on fcron and snort Sven Vermeulen
2014-04-20  8:55 ` [refpolicy] [PATCH 1/2] Snort policy updates Sven Vermeulen

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=5359425D.4080202@tresys.com \
    --to=cpebenito@tresys.com \
    --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.