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 2/3] user access to DOS filesystems
Date: Wed, 5 Sep 2012 13:58:14 -0400	[thread overview]
Message-ID: <504792B6.2050606@tresys.com> (raw)
In-Reply-To: <1346860228-12760-1-git-send-email-bigon@debian.org>

On 09/05/12 11:50, Laurent Bigonville wrote:
> From: Mika Pfl??ger <debian@mikapflueger.de>
> 
> Add a new boolean to grant users access to dosfs_t.
> ---
>  policy/global_tunables              |    7 +++++++
>  policy/modules/system/userdomain.if |    6 ++++++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/policy/global_tunables b/policy/global_tunables
> index 4705ab6..092df0b 100644
> --- a/policy/global_tunables
> +++ b/policy/global_tunables
> @@ -111,3 +111,10 @@ gen_tunable(use_samba_home_dirs,false)
>  ## </p>
>  ## </desc>
>  gen_tunable(user_tcp_server,false)
> +
> +## <desc>
> +## <p>
> +## Determine whether users can manage dosfs content.
> +## </p>
> +## </desc>
> +gen_tunable(userdomain_manage_dos_content,false)

This should be moved to the userdomain module, as its effect is only in that module.  Global tunables should only be used if the tunable is used in multiple modules.

> diff --git a/policy/modules/system/userdomain.if b/policy/modules/system/userdomain.if
> index e720dcd..949c738 100644
> --- a/policy/modules/system/userdomain.if
> +++ b/policy/modules/system/userdomain.if
> @@ -117,6 +117,12 @@ template(`userdom_base_user_template',`
>  		# Allow making the stack executable via mprotect.
>  		allow $1_t self:process execstack;
>  	')
> +
> +	tunable_policy(`userdomain_manage_dos_content',`
> +		fs_manage_dos_dirs($1_t)
> +		fs_manage_dos_files($1_t)
> +	')
> +

This is too low level of a template for this access.  It should be moved to a higher level template such as userdom_common_user_template.  userdom_base_user_template is supposed to define the most minimal user.

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

  reply	other threads:[~2012-09-05 17:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-04 21:21 [refpolicy] [PATCH 1/3] Mark use of deprecated interfaces that are not providing replacement as errors Laurent Bigonville
2012-09-04 21:21 ` [refpolicy] [PATCH 2/3] user access to DOS files Laurent Bigonville
2012-09-04 23:45   ` Guido Trentalancia
2012-09-05  0:32     ` Russell Coker
2012-09-05  8:47       ` Guido Trentalancia
2012-09-05  7:00     ` Dominick Grift
2012-09-05  8:41       ` Guido Trentalancia
2012-09-05 13:24         ` Daniel J Walsh
2012-09-05 15:04           ` Guido Trentalancia
2012-09-06 11:14           ` [refpolicy] [PATCH]: turn all/most tunable policy booleans off by default (was Re: [PATCH 2/3] user access to DOS files) Guido Trentalancia
2012-09-06 12:54             ` Daniel J Walsh
2012-09-05 15:50       ` [refpolicy] [PATCH v2 2/3] user access to DOS filesystems Laurent Bigonville
2012-09-05 17:58         ` Christopher J. PeBenito [this message]
2012-09-06 14:24   ` [refpolicy] [PATCH 2/3] user access to DOS files Laurent Bigonville
2012-09-06 16:31     ` Guido Trentalancia
2012-09-06 16:39       ` Guido Trentalancia
2012-09-06 17:05       ` Guido Trentalancia
2012-09-04 21:21 ` [refpolicy] [PATCH 3/3] Allow iptables_t to do module_request Laurent Bigonville
2012-09-04 22:57   ` Guido Trentalancia
2012-09-05  0:30     ` Russell Coker
2012-09-05  8:48       ` Guido Trentalancia
2012-09-05  9:23         ` Laurent Bigonville

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=504792B6.2050606@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.