From: cpebenito@tresys.com (Christopher J. PeBenito)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH] Declare a virtio device node type
Date: Wed, 3 Oct 2012 10:04:39 -0400 [thread overview]
Message-ID: <506C45F7.8000208@tresys.com> (raw)
In-Reply-To: <1347442034-26084-1-git-send-email-dominick.grift@gmail.com>
On 09/12/12 05:27, Dominick Grift wrote:
>
> Label virtio character device nodes accordingly
>
> Create term_use_virtio_console() for vdagent
>
> Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
> diff --git a/policy/modules/kernel/terminal.fc b/policy/modules/kernel/terminal.fc
> index 7d45d15..0ea25b6 100644
> --- a/policy/modules/kernel/terminal.fc
> +++ b/policy/modules/kernel/terminal.fc
> @@ -19,6 +19,7 @@
> /dev/slamr[0-9]+ -c gen_context(system_u:object_r:tty_device_t,s0)
> /dev/tty -c gen_context(system_u:object_r:devtty_t,s0)
> /dev/ttySG.* -c gen_context(system_u:object_r:tty_device_t,s0)
> +/dev/vport[0-9]p[0-9]+ -c gen_context(system_u:object_r:virtio_device_t,s0)
> /dev/xvc[^/]* -c gen_context(system_u:object_r:tty_device_t,s0)
>
> /dev/pty/.* -c gen_context(system_u:object_r:bsdpty_device_t,s0)
> diff --git a/policy/modules/kernel/terminal.if b/policy/modules/kernel/terminal.if
> index 01dd2f1..bfaff9f 100644
> --- a/policy/modules/kernel/terminal.if
> +++ b/policy/modules/kernel/terminal.if
> @@ -1493,3 +1493,22 @@
> refpolicywarn(`$0() is deprecated, use term_dontaudit_use_all_ttys() instead.')
> term_dontaudit_use_all_ttys($1)
> ')
> +
> +########################################
> +## <summary>
> +## Read from and write to virtio console.
> +## </summary>
> +## <param name="domain">
> +## <summary>
> +## Domain allowed access.
> +## </summary>
> +## </param>
> +#
> +interface(`term_use_virtio_console',`
> + gen_require(`
> + type virtio_device_t;
> + ')
> +
> + dev_list_all_dev_nodes($1)
> + allow $1 virtio_device_t:chr_file rw_chr_file_perms;
> +')
Is this really only a console/serial device? The bits that I can find seem to imply its more than just a console, but I'm not sure.
--
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com
prev parent reply other threads:[~2012-10-03 14:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-12 9:27 [refpolicy] [PATCH] Declare a virtio device node type Dominick Grift
2012-10-03 14:04 ` Christopher J. PeBenito [this message]
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=506C45F7.8000208@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.