All of lore.kernel.org
 help / color / mirror / Atom feed
From: sven.vermeulen@siphos.be (Sven Vermeulen)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCHv2 6/8] Introduce gpg_exec interface
Date: Sat, 3 Sep 2011 16:22:22 +0200	[thread overview]
Message-ID: <20110903142222.GG25374@siphos.be> (raw)
In-Reply-To: <20110903141833.GA25374@siphos.be>

Some applications might want to execute gpg without requiring a
transition. A possible use case is to allow applications to validate
signatures (made by GnuPG). As long as the application doesn't need to
generate signatures itself and its trustdb is not marked as
gpg_secret_t, it suffices to grant it gpg_exec().

Note that it does require the application to have read/write rights in
the directory where the trustdb is stored (as gpg tries to generate lock
files where the trustdb file is located).

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
---
 policy/modules/apps/gpg.if |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/policy/modules/apps/gpg.if b/policy/modules/apps/gpg.if
index 40e0a2a..6d50300 100644
--- a/policy/modules/apps/gpg.if
+++ b/policy/modules/apps/gpg.if
@@ -87,6 +87,24 @@ interface(`gpg_domtrans',`
 
 ########################################
 ## <summary>
+##	Execute the gpg application without transitioning
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed to execute gpg
+##	</summary>
+## </param>
+#
+interface(`gpg_exec',`
+	gen_require(`
+		type gpg_exec_t;
+	')
+
+	can_exec($1, gpg_exec_t)
+')
+
+########################################
+## <summary>
 ##	Send generic signals to user gpg processes.
 ## </summary>
 ## <param name="domain">
-- 
1.7.3.4

  parent reply	other threads:[~2011-09-03 14:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-03 14:18 [refpolicy] [PATCHv2 0/8] Portage-related updates Sven Vermeulen
2011-09-03 14:19 ` [refpolicy] [PATCHv2 1/8] Introduce rc_exec_t as file entry for initrc_t Sven Vermeulen
2011-09-03 14:20 ` [refpolicy] [PATCHv2 2/8] Allow gcc-config to execute rc Sven Vermeulen
2011-09-03 14:20 ` [refpolicy] [PATCHv2 3/8] Gentoo integrated run_init support re-executes rc Sven Vermeulen
2011-09-03 14:21 ` [refpolicy] [PATCHv2 4/8] Allow the sysadm domain to execute rc Sven Vermeulen
2011-09-03 14:21 ` [refpolicy] [PATCHv2 5/8] Introduce portage_fetch_t as an application domain Sven Vermeulen
2011-09-06 18:09   ` Christopher J. PeBenito
2011-09-03 14:22 ` Sven Vermeulen [this message]
2011-09-03 14:22 ` [refpolicy] [PATCH 7/8] Allow portage to call gpg Sven Vermeulen
2011-09-03 14:23 ` [refpolicy] [PATCH 8/8] Allow cron to execute portage commands Sven Vermeulen
2011-09-06 18:08 ` [refpolicy] [PATCHv2 0/8] Portage-related updates 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=20110903142222.GG25374@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.