All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dominick Grift <dac.override@gmail.com>
To: "Sugar\, David" <dsugar@tresys.com>
Cc: "selinux-refpolicy\@vger.kernel.org" 
	<selinux-refpolicy@vger.kernel.org>
Subject: Re: [PATCH] Add interface to allow relabeling of iso 9660 filesystems.
Date: Wed, 06 Mar 2019 09:20:53 +0100	[thread overview]
Message-ID: <87wolcxvkq.fsf@gmail.com> (raw)
In-Reply-To: <20190305223209.18922-1-dsugar@tresys.com> (David Sugar's message of "Tue, 5 Mar 2019 22:32:44 +0000")

"Sugar, David" <dsugar@tresys.com> writes:

> I have a case where I'm labeling media with my own types to control
> access.  But that is requiring that I relabel from iso9660_t to my
> own type.  This interface allows that relabel.

Not sure why you would want this as iso9600 is read-only any way, I
suppose you want to block read access for entities that can already read iso9660.

>
> type=AVC msg=audit(1551621984.372:919): avc:  denied  { relabelfrom } for  pid=9717 comm="mount" scontext=staff_u:staff_r:mymedia_sudo_t:s0-s0:c0.c1023 tcontext=system_u:object_r:iso9660_t:s0 tclass=filesystem permissive=0
>
> Signed-off-by: Dave Sugar <dsugar@tresys.com>
> ---
>  policy/modules/kernel/filesystem.if | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>
> diff --git a/policy/modules/kernel/filesystem.if b/policy/modules/kernel/filesystem.if
> index 048b9d65..a22cb6ba 100644
> --- a/policy/modules/kernel/filesystem.if
> +++ b/policy/modules/kernel/filesystem.if
> @@ -2505,6 +2505,25 @@ interface(`fs_remount_iso9660_fs',`
>  	allow $1 iso9660_t:filesystem remount;
>  ')
>  
> +########################################
> +## <summary>
> +##	Allow changing of the label of a
> +##	filesystem with iso9660 type
> +## </summary>
> +## <param name="domain">
> +##	<summary>
> +##	Domain allowed access.
> +##	</summary>
> +## </param>
> +#
> +interface(`fs_relabelfrom_iso9660_fs',`
> +	gen_require(`
> +		type iso9660_t;
> +	')
> +
> +	allow $1 iso9660_t:filesystem relabelfrom;
> +')
> +
>  ########################################
>  ## <summary>
>  ##	Unmount an iso9660 filesystem, which

-- 
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02
https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02
Dominick Grift

  reply	other threads:[~2019-03-06  8:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-05 22:32 [PATCH] Add interface to allow relabeling of iso 9660 filesystems Sugar, David
2019-03-06  8:20 ` Dominick Grift [this message]
2019-03-06 14:18   ` Sugar, David
2019-03-07 23:55 ` Chris PeBenito

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=87wolcxvkq.fsf@gmail.com \
    --to=dac.override@gmail.com \
    --cc=dsugar@tresys.com \
    --cc=selinux-refpolicy@vger.kernel.org \
    /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.