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 3/3] Grant kernel_t necessary permissions for loopback mounts
Date: Fri, 31 Jan 2014 22:32:44 -0500	[thread overview]
Message-ID: <52EC6ADC.2020705@tresys.com> (raw)
In-Reply-To: <1391035512-25441-4-git-send-email-aranea@aixah.de>

On 1/29/2014 5:45 PM, Luis Ressel wrote:
> For loopback mounts to work, the kernel requires access permissions to
> fd's passed in by mount and to the source files (labeled mount_loopback_t).
> ---
>  policy/modules/kernel/kernel.te | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/policy/modules/kernel/kernel.te b/policy/modules/kernel/kernel.te
> index 6a2e170..0742a0c 100644
> --- a/policy/modules/kernel/kernel.te
> +++ b/policy/modules/kernel/kernel.te
> @@ -287,6 +287,10 @@ files_list_etc(kernel_t)
>  files_list_home(kernel_t)
>  files_read_usr_files(kernel_t)
>  
> +allow kernel_t mount_t:fd use;

The interface that exists in the mount module should be used for this access.

> +allow kernel_t mount_loopback_t:fd use;

mount_loopback_t is not a process so this has no effect.

> +allow kernel_t mount_loopback_t:file read_file_perms;

An interface needs to be created and used for this access.

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

  reply	other threads:[~2014-02-01  3:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-29 22:45 [refpolicy] Support loopback mounts Luis Ressel
2014-01-29 22:45 ` [refpolicy] [PATCH 1/3] Allow mount_t to follow mount_loopback_t symlinks Luis Ressel
2014-02-01  3:28   ` Christopher J. PeBenito
2014-02-01 11:53     ` Luis Ressel
2014-01-29 22:45 ` [refpolicy] [PATCH 2/3] Allow mount_t usage of /dev/loop-control Luis Ressel
2014-02-01  3:26   ` Christopher J. PeBenito
2014-01-29 22:45 ` [refpolicy] [PATCH 3/3] Grant kernel_t necessary permissions for loopback mounts Luis Ressel
2014-02-01  3:32   ` Christopher J. PeBenito [this message]
2014-02-01 13:14     ` Luis Ressel

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=52EC6ADC.2020705@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.