From: cpebenito@tresys.com (Christopher J. PeBenito)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH 3/3] Add neccessary permissions for losetup
Date: Mon, 3 Mar 2014 09:28:52 -0500 [thread overview]
Message-ID: <531491A4.4040902@tresys.com> (raw)
In-Reply-To: <1392568477-15921-4-git-send-email-aranea@aixah.de>
On 2/16/2014 11:34 AM, Luis Ressel wrote:
> This allows losetup to bind mount_loopback_t files to loop devices.
> ---
> policy/modules/kernel/kernel.te | 2 ++
> policy/modules/system/fstools.te | 4 ++++
> 2 files changed, 6 insertions(+)
>
> diff --git a/policy/modules/kernel/kernel.te b/policy/modules/kernel/kernel.te
> index 7f7372f..cdea637 100644
> --- a/policy/modules/kernel/kernel.te
> +++ b/policy/modules/kernel/kernel.te
> @@ -317,6 +317,8 @@ optional_policy(`
> ')
>
> optional_policy(`
> + # loop devices
> + fsadm_use_fds(kernel_t)
> mount_use_fds(kernel_t)
> mount_read_loopback_files(kernel_t)
> ')
While I doubt that any system would be missing mount, I could see a stateless system missing fsadm. This addition should be separated out into another optional.
> diff --git a/policy/modules/system/fstools.te b/policy/modules/system/fstools.te
> index 653d0b9..8c751f5 100644
> --- a/policy/modules/system/fstools.te
> +++ b/policy/modules/system/fstools.te
> @@ -53,6 +53,10 @@ logging_log_filetrans(fsadm_t, fsadm_log_t, file)
> # Enable swapping to files
> allow fsadm_t swapfile_t:file { rw_file_perms swapon };
>
> +# losetup: bind mount_loopback_t files to loop devices
> +dev_rw_loop_control(fsadm_t)
> +mount_rw_loopback_files(fsadm_t)
These need to be moved to their correct place in the file.
--
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com
next prev parent reply other threads:[~2014-03-03 14:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-16 16:34 [refpolicy] Loop device handling with losetup Luis Ressel
2014-02-16 16:34 ` [refpolicy] [PATCH 1/3] system/mount.if: Add mount_rw_loopback_files interface Luis Ressel
2014-02-16 16:34 ` [refpolicy] [PATCH 2/3] system/fstools.if: Add fstools_use_fds interface Luis Ressel
2014-02-16 16:34 ` [refpolicy] [PATCH 3/3] Add neccessary permissions for losetup Luis Ressel
2014-03-03 14:28 ` Christopher J. PeBenito [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-08-11 13:33 [refpolicy] [PATCH 1/3] system/mount.if: Add mount_rw_loopback_files interface Luis Ressel
2014-08-11 13:33 ` [refpolicy] [PATCH 3/3] Add neccessary permissions for losetup Luis Ressel
2014-08-11 13:37 ` Luis Ressel
2014-08-11 22:19 ` 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=531491A4.4040902@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.