From: sven.vermeulen@siphos.be (Sven Vermeulen)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH 2/2] Support emerge-webrsync through portage domain
Date: Sun, 24 Jul 2011 12:43:46 +0200 [thread overview]
Message-ID: <20110724104346.GC6581@siphos.be> (raw)
In-Reply-To: <20110724104149.GA6581@siphos.be>
The emerge-webrsync application fetches snapshots (archives), extracts them and
then synchronizes the local tree with the snapshot. It uses portage code (and
libraries) to do so, but is implemented as a wrapper as it also offers the
possibility of verifying the GPG signature of the snapshot first.
By putting emerge-webrsync in portage' domain, it is handled through the regular
portage_run() and portage_domtrans() methods. It is also necessary to put it in
this domain for unattended/automated calls, such as through cron and puppet.
Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
---
policy/modules/admin/portage.fc | 2 ++
policy/modules/admin/portage.te | 4 ++++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/policy/modules/admin/portage.fc b/policy/modules/admin/portage.fc
index 38cc918..b1bb073 100644
--- a/policy/modules/admin/portage.fc
+++ b/policy/modules/admin/portage.fc
@@ -8,6 +8,7 @@
/usr/lib(64)?/portage/bin/ebuild -- gen_context(system_u:object_r:portage_exec_t,s0)
/usr/lib(64)?/portage/bin/emerge -- gen_context(system_u:object_r:portage_exec_t,s0)
+/usr/lib(64)?/portage/bin/emerge-webrsync -- gen_context(system_u:object_r:portage_exec_t,s0)
/usr/lib(64)?/portage/bin/quickpkg -- gen_context(system_u:object_r:portage_exec_t,s0)
/usr/lib(64)?/portage/bin/ebuild\.sh -- gen_context(system_u:object_r:portage_exec_t,s0)
/usr/lib(64)?/portage/bin/regenworld -- gen_context(system_u:object_r:portage_exec_t,s0)
@@ -22,5 +23,6 @@
/var/log/portage(/.*)? gen_context(system_u:object_r:portage_log_t,s0)
/var/lib/layman(/.*)? gen_context(system_u:object_r:layman_var_lib_t,s0)
/var/lib/portage(/.*)? gen_context(system_u:object_r:portage_cache_t,s0)
+/var/tmp/emerge-webrsync(/.*)? gen_context(system_u:object_r:portage_tmp_t,s0)
/var/tmp/portage(/.*)? gen_context(system_u:object_r:portage_tmp_t,s0)
/var/tmp/portage-pkg(/.*)? gen_context(system_u:object_r:portage_tmp_t,s0)
diff --git a/policy/modules/admin/portage.te b/policy/modules/admin/portage.te
index 7d7242d..d392124 100644
--- a/policy/modules/admin/portage.te
+++ b/policy/modules/admin/portage.te
@@ -240,6 +240,10 @@ optional_policy(`
')
optional_policy(`
+ gpg_domtrans(portage_t)
+')
+
+optional_policy(`
modutils_domtrans_depmod(portage_t)
modutils_domtrans_update_mods(portage_t)
#dontaudit update_modules_t portage_tmp_t:dir search_dir_perms;
--
1.7.3.4
prev parent reply other threads:[~2011-07-24 10:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-24 10:41 [refpolicy] [PATCH 0/2] Gentoo Portage patches: layman and emerge-webrsync Sven Vermeulen
2011-07-24 10:43 ` [refpolicy] [PATCH 1/2] Support layman through its own domain Sven Vermeulen
2011-07-29 12:49 ` Christopher J. PeBenito
2011-07-24 10:43 ` Sven Vermeulen [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=20110724104346.GC6581@siphos.be \
--to=sven.vermeulen@siphos.be \
--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.