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 10/34]: patch to list/read consolekit pid files
Date: Wed, 23 Feb 2011 09:25:22 -0500	[thread overview]
Message-ID: <4D6518D2.5050804@tresys.com> (raw)
In-Reply-To: <1297836521.3205.46.camel@tesla.lan>

On 02/16/11 01:08, Guido Trentalancia wrote:
> This patch adds a new interface to the consolekit module so that
> pid files can be listed. It then uses such interface so that
> consolekit pid files can be listed and read by both dbus and policykit.
> 
> diff -pruN refpolicy-git-02022011-test-apply/policy/modules/services/consolekit.if refpolicy-git-02022011-test-apply2/policy/modules/services/consolekit.if
> --- refpolicy-git-02022011-test-apply/policy/modules/services/consolekit.if	2011-01-08 19:07:21.232739776 +0100
> +++ refpolicy-git-02022011-test-apply2/policy/modules/services/consolekit.if	2011-02-07 01:37:43.085350703 +0100
> @@ -79,6 +79,24 @@ interface(`consolekit_manage_log',`
>  
>  ########################################
>  ## <summary>
> +##      List consolekit PID files.
> +## </summary>
> +## <param name="domain">
> +##      <summary>
> +##      Domain allowed access.
> +##      </summary>
> +## </param>
> +#
> +interface(`consolekit_list_pid_files',`
> +	gen_require(`
> +		type consolekit_var_run_t;
> +	')
> +
> +	list_dirs_pattern($1, consolekit_var_run_t, consolekit_var_run_t)
> +')
> +
> +########################################
> +## <summary>
>  ##	Read consolekit PID files.
>  ## </summary>
>  ## <param name="domain">
> diff -pruN refpolicy-git-02022011-test-apply/policy/modules/services/dbus.te refpolicy-git-02022011-test-apply2/policy/modules/services/dbus.te
> --- refpolicy-git-02022011-test-apply/policy/modules/services/dbus.te	2011-02-07 01:14:05.487312743 +0100
> +++ refpolicy-git-02022011-test-apply2/policy/modules/services/dbus.te	2011-02-07 01:38:44.965333102 +0100
> @@ -141,6 +141,11 @@ optional_policy(`
>  ')
>  
>  optional_policy(`
> +	consolekit_list_pid_files(system_dbusd_t)
> +	consolekit_read_pid_files(system_dbusd_t)
> +')
> +
> +optional_policy(`
>  	cpufreqselector_dbus_chat(system_dbusd_t)
>  ')
>  
> diff -pruN refpolicy-git-02022011-test-apply/policy/modules/services/policykit.te refpolicy-git-02022011-test-apply2/policy/modules/services/policykit.te
> --- refpolicy-git-02022011-test-apply/policy/modules/services/policykit.te	2011-02-07 01:01:15.075210887 +0100
> +++ refpolicy-git-02022011-test-apply2/policy/modules/services/policykit.te	2011-02-07 01:40:21.323469411 +0100
> @@ -70,6 +70,11 @@ miscfiles_read_localization(policykit_t)
>  userdom_read_all_users_state(policykit_t)
>  
>  optional_policy(`
> +	consolekit_list_pid_files(policykit_t)
> +	consolekit_read_pid_files(policykit_t)
> +')
> +
> +optional_policy(`
>  	gnome_read_config(policykit_t)
>  ')

I think it would be fine just to add the list permission to the
read_pid_files interface.

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

  reply	other threads:[~2011-02-23 14:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-16  6:08 [refpolicy] [PATCH 10/34]: patch to list/read consolekit pid files Guido Trentalancia
2011-02-23 14:25 ` Christopher J. PeBenito [this message]
2011-02-23 19:23   ` Guido Trentalancia

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=4D6518D2.5050804@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.