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/4] Support live ebuilds
Date: Mon, 02 May 2011 11:25:18 -0400	[thread overview]
Message-ID: <4DBECCDE.1000608@tresys.com> (raw)
In-Reply-To: <20110428192508.GA29963@siphos.be>

On 04/28/11 15:25, Sven Vermeulen wrote:
> In Gentoo, live ebuilds exist (packages) which use the latest checkout of a
> version controlled repository (git, svn, cvs, ...). During installation,
> Portage checks out this repository in (by default)
> /usr/portage/distfiles/svn-src. Currently, this is labelled portage_ebuild_t
> but it is just plain wrong to allow the portage_sandbox_t to manage this
> type (which, btw, it can't do currently, so live ebuild installations isn't
> supported with the current policy).
> 
> To resolve this, create an additional type (portage_svnsrc_t) and label the
> location accordingly. Also, allow portage_sandbox_t to manage the files,
> directories and links that it checks out by allowing the necessary
> privileges on portage_svnsrc_t.
> 
> Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
> ---
>  policy/modules/admin/portage.fc |    1 +
>  policy/modules/admin/portage.if |    5 +++++
>  policy/modules/admin/portage.te |    3 +++
>  3 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/policy/modules/admin/portage.fc b/policy/modules/admin/portage.fc
> index db46387..f6daba8 100644
> --- a/policy/modules/admin/portage.fc
> +++ b/policy/modules/admin/portage.fc
> @@ -13,6 +13,7 @@
>  /usr/lib(64)?/portage/bin/sandbox --	gen_context(system_u:object_r:portage_exec_t,s0)
>  
>  /usr/portage(/.*)?			gen_context(system_u:object_r:portage_ebuild_t,s0)
> +/usr/portage/distfiles/svn-src(/.*)?	gen_context(system_u:object_r:portage_svnsrc_t,s0)

Its been a while since I used a live ebuild, but iirc, there are other
dirs such as cvs-src (maybe git-src, etc. too?)

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

      reply	other threads:[~2011-05-02 15:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-28 19:25 [refpolicy] [PATCH 1/4] Support live ebuilds Sven Vermeulen
2011-05-02 15:25 ` Christopher J. PeBenito [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=4DBECCDE.1000608@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.