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 v2] Conditionally allow ssh to use gpg-agent
Date: Sat, 8 Feb 2014 08:32:06 -0500	[thread overview]
Message-ID: <52F631D6.5040508@tresys.com> (raw)
In-Reply-To: <1391343571-18264-1-git-send-email-aranea@aixah.de>

On 2/2/2014 7:19 AM, Luis Ressel wrote:
> gpg-agent also offers an ssh-compatible interface. This is useful e.g.
> for smartcard authentication.
> ---
>  policy/modules/services/ssh.if |  7 +++++++
>  policy/modules/services/ssh.te | 13 +++++++++++++
>  2 files changed, 20 insertions(+)
> 
> diff --git a/policy/modules/services/ssh.if b/policy/modules/services/ssh.if
> index fe0c682..7e7b6f6 100644
> --- a/policy/modules/services/ssh.if
> +++ b/policy/modules/services/ssh.if
> @@ -425,6 +425,13 @@ template(`ssh_role_template',`
>  		xserver_use_xdm_fds($1_ssh_agent_t)
>  		xserver_rw_xdm_pipes($1_ssh_agent_t)
>  	')
> +
> +	optional_policy(`
> +		tunable_policy(`ssh_use_gpg_agent',`
> +			# for ssh-add
> +			gpg_agent_connect($3)
> +		')
> +	')
>  ')
>  
>  ########################################
> diff --git a/policy/modules/services/ssh.te b/policy/modules/services/ssh.te
> index 30726f2..68e70e9 100644
> --- a/policy/modules/services/ssh.te
> +++ b/policy/modules/services/ssh.te
> @@ -19,6 +19,13 @@ gen_tunable(allow_ssh_keysign, false)
>  ## </desc>
>  gen_tunable(ssh_sysadm_login, false)
>  
> +## <desc>
> +## <p>
> +## Allow ssh to use gpg-agent
> +## </p>
> +## </desc>
> +gen_tunable(ssh_use_gpg_agent, false)
> +
>  attribute ssh_server;
>  attribute ssh_agent_type;
>  
> @@ -202,6 +209,12 @@ optional_policy(`
>  	xserver_domtrans_xauth(ssh_t)
>  ')
>  
> +optional_policy(`
> +	tunable_policy(`ssh_use_gpg_agent',`
> +		gpg_agent_connect(ssh_t)
> +	')
> +')
> +
>  ##############################
>  #
>  # ssh_keysign_t local policy
 
Merged.

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

      reply	other threads:[~2014-02-08 13:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-02  0:19 [refpolicy] [PATCH] Conditionally allow ssh to use gpg-agent Luis Ressel
2014-02-02 12:05 ` Luis Ressel
2014-02-02 12:18   ` [refpolicy] [PATCH v2] gpg: Create gpg_agent_connect interface Luis Ressel
2014-02-08 13:31     ` Christopher J. PeBenito
2014-02-02 12:19   ` [refpolicy] [PATCH v2] Conditionally allow ssh to use gpg-agent Luis Ressel
2014-02-08 13:32     ` 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=52F631D6.5040508@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.