All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philip Tricca <flihp@twobit.us>
To: "yocto@yoctoproject.org" <yocto@yoctoproject.org>
Subject: Re: [meta-selinux][RFC] refpolicy: Add generic refpolicy recipe with configurable policy type.
Date: Wed, 13 Nov 2013 12:22:51 -0500	[thread overview]
Message-ID: <5283B56B.4040305@twobit.us> (raw)
In-Reply-To: <1384320159-1000-1-git-send-email-flihp@twobit.us>

This requires a few tweaks before it will work as advertised. I had a
variable set in a distro.conf that interfered. I'll send out a v2 in a bit.

- Philip

On 11/13/2013 12:22 AM, Philip Tricca wrote:
> This RFC is a significant departure from the way the policy packages are
> currently set up. The noteworthy differences are:
> 1) the POLICY_TYPE variable can be set as configuration outside the policy recipe
> 2) a single refpolicy recipe can be used to build all 3 policy types
> 3) DEFAULT_POLICY from selinux-config can be set outside the config recipe
> 4) refpolicy depends on the config and sets the DEFAULT_POLICY accordingly
> 
> This approach was taken to allow the use of a policy type beyond MLS. I've
> left the other refpolicy-* recipes in tact but if this approach is acceptable
> they could be removed if we're willing to accept the limitation that only
> one policy may be installed on a given image. If this limitation isn't \
> acceptable then they can be left as is.
> 
> Comments and input would be appreciated.
> 
> Cheers,
> - Philip
> 
> Signed-off-by: Philip Tricca <flihp@twobit.us>
> ---
>  .../packagegroups/packagegroup-selinux-minimal.bb   |    3 +--
>  recipes-security/refpolicy/refpolicy_2.20130424.bb  |   19 +++++++++++++++++++
>  recipes-security/selinux/selinux-config_0.1.bb      |    2 +-
>  3 files changed, 21 insertions(+), 3 deletions(-)
>  create mode 100644 recipes-security/refpolicy/refpolicy_2.20130424.bb
> 
> diff --git a/recipes-security/packagegroups/packagegroup-selinux-minimal.bb b/recipes-security/packagegroups/packagegroup-selinux-minimal.bb
> index 072320d..af29da1 100644
> --- a/recipes-security/packagegroups/packagegroup-selinux-minimal.bb
> +++ b/recipes-security/packagegroups/packagegroup-selinux-minimal.bb
> @@ -13,6 +13,5 @@ ALLOW_EMPTY_${PN} = "1"
>  RDEPENDS_${PN} = "\
>  	policycoreutils-semodule \
>  	policycoreutils-sestatus \
> -	selinux-config \
> -	refpolicy-mls \
> +	refpolicy \
>  "
> diff --git a/recipes-security/refpolicy/refpolicy_2.20130424.bb b/recipes-security/refpolicy/refpolicy_2.20130424.bb
> new file mode 100644
> index 0000000..c00aca3
> --- /dev/null
> +++ b/recipes-security/refpolicy/refpolicy_2.20130424.bb
> @@ -0,0 +1,19 @@
> +SUMMARY = "The SELinux reference policy."
> +DESCRIPTION = "\
> +This is the reference policy for the SELinux mandatory access control \
> +system. There are 3 supported policy types: standard, MCS and MLS. The \
> +standard policy is the most simple of the three providing the standard \
> +type enforcement policy. The MCS policy adds an additional element to the \
> +SELinux label called a category. Finally the MLS variant allows giving data \
> +labels such as \"Top Secret\" and preventing such data from leaking to \
> +processes or files with lower classification. \
> +"
> +
> +PR = "r0"
> +
> +POLICY_TYPE ??= "mls"
> +DEFAULT_POLICY = "${POLICY_TYPE}"
> +
> +RDEPENDS_${PN} = "selinux-config"
> +
> +include refpolicy_${PV}.inc
> diff --git a/recipes-security/selinux/selinux-config_0.1.bb b/recipes-security/selinux/selinux-config_0.1.bb
> index 27d9995..293218e 100644
> --- a/recipes-security/selinux/selinux-config_0.1.bb
> +++ b/recipes-security/selinux/selinux-config_0.1.bb
> @@ -1,4 +1,4 @@
> -DEFAULT_POLICY = "mls"
> +DEFAULT_POLICY ??= "mls"
>  
>  SUMMARY = "SELinux configuration"
>  DESCRIPTION = "\
> 



      reply	other threads:[~2013-11-13 17:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13  5:22 [meta-selinux][RFC] refpolicy: Add generic refpolicy recipe with configurable policy type Philip Tricca
2013-11-13 17:22 ` Philip Tricca [this message]

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=5283B56B.4040305@twobit.us \
    --to=flihp@twobit.us \
    --cc=yocto@yoctoproject.org \
    /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.