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 v2 1/2] DHCP client's hooks create /run/dhcpc directory
Date: Tue, 7 Aug 2012 13:22:13 -0400	[thread overview]
Message-ID: <50214EC5.7010005@tresys.com> (raw)
In-Reply-To: <1343756789-16068-2-git-send-email-sven.vermeulen@siphos.be>

On 07/31/12 13:46, Sven Vermeulen wrote:
> This directory contains the working files for updating network-related files
> (like resolv.conf for name servers) before they are copied to the fixed
> location. Although already in use previously, this location (/var/run/dhcpc or
> /var/run/dhcpcd) was statically defined on the system.
> 
> With the introduction of /run and systems having /var/run -> /run, this is now a
> dynamically created directory by dhcpc_t. Hence, the policy is enhanced allowing
> dhcpc_t to manage dhcpc_var_run_t directories, and include a file transition for
> directories created in the var_run_t location(s).
> 
> Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
> ---
>  policy/modules/system/sysnetwork.te |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/policy/modules/system/sysnetwork.te b/policy/modules/system/sysnetwork.te
> index 8aed9d0..f3f9d47 100644
> --- a/policy/modules/system/sysnetwork.te
> +++ b/policy/modules/system/sysnetwork.te
> @@ -65,7 +65,8 @@ filetrans_pattern(dhcpc_t, dhcp_state_t, dhcpc_state_t, file)
>  
>  # create pid file
>  manage_files_pattern(dhcpc_t, dhcpc_var_run_t, dhcpc_var_run_t)
> -files_pid_filetrans(dhcpc_t, dhcpc_var_run_t, file)
> +manage_dirs_pattern(dhcpc_t, dhcpc_var_run_t, dhcpc_var_run_t)

Does it actually delete dirs?  Wouldn't create_dirs_pattern() be sufficient?

> +files_pid_filetrans(dhcpc_t, dhcpc_var_run_t, { file dir })

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

  reply	other threads:[~2012-08-07 17:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-31 17:46 [refpolicy] [PATCH v2 0/2] More /run changes Sven Vermeulen
2012-07-31 17:46 ` [refpolicy] [PATCH v2 1/2] DHCP client's hooks create /run/dhcpc directory Sven Vermeulen
2012-08-07 17:22   ` Christopher J. PeBenito [this message]
2012-07-31 17:46 ` [refpolicy] [PATCH v2 2/2] Allow init scripts to create /run/mysqld and /run/dbus Sven Vermeulen
2012-08-07 17:20   ` Christopher J. PeBenito
2012-08-07 17:35     ` Sven Vermeulen
2012-08-07 17:42       ` Christopher J. PeBenito
2012-08-07 17:59         ` Sven Vermeulen
2012-08-07 18:04           ` Dominick Grift
2012-08-07 18:28             ` Christopher J. PeBenito
2012-08-10 17:28         ` Sven Vermeulen
2012-08-14 12:19           ` 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=50214EC5.7010005@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.