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] Remove optional else block for dhcp ping
Date: Wed, 3 Dec 2014 08:14:10 -0500	[thread overview]
Message-ID: <547F0CA2.9000207@tresys.com> (raw)
In-Reply-To: <1417537634-15820-1-git-send-email-slawrence@tresys.com>

On 12/2/2014 11:27 AM, Steve Lawrence wrote:
> Else blocks with optional statements are not supported in CIL.
> Currently, if the pp to CIL compiler comes across one of these in a pp
> module, it just drops the block and outputs a warning. Fortunately,
> these are very rare. In fact, this is the only place in refpolicy where
> an optional else block is used, and it is not clear if it is even
> needed. This patch is untested, and is more to spark discussions to see
> if there are any thoughts about whether or not this piece of policy is
> needed.
> 
> Signed-off-by: Steve Lawrence <slawrence@tresys.com>
> ---
>  policy/modules/system/sysnetwork.te | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/policy/modules/system/sysnetwork.te b/policy/modules/system/sysnetwork.te
> index 705496d..ddb5a92 100644
> --- a/policy/modules/system/sysnetwork.te
> +++ b/policy/modules/system/sysnetwork.te
> @@ -195,9 +195,6 @@ optional_policy(`
>  optional_policy(`
>  	netutils_run_ping(dhcpc_t, dhcpc_roles)
>  	netutils_run(dhcpc_t, dhcpc_roles)
> -',`
> -	allow dhcpc_t self:capability setuid;
> -	allow dhcpc_t self:rawip_socket create_socket_perms;
>  ')
>  
>  optional_policy(`

In practice, it's probably not used, so I think we could remove it.


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

  reply	other threads:[~2014-12-03 13:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-02 16:27 [refpolicy] [PATCH] Remove optional else block for dhcp ping Steve Lawrence
2014-12-03 13:14 ` Christopher J. PeBenito [this message]
2014-12-21 10:38 ` Jason Zaman

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=547F0CA2.9000207@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.