2012-10-17 12:29:18

by dominick.grift

[permalink] [raw]
Subject: [refpolicy] [PATCH] Changes to the kernel policy module


Interface is needed by at least plymouth

Signed-off-by: Dominick Grift <[email protected]>
diff --git a/policy/modules/kernel/kernel.if b/policy/modules/kernel/kernel.if
index 4bf45cb..7cbf5d6 100644
--- a/policy/modules/kernel/kernel.if
+++ b/policy/modules/kernel/kernel.if
@@ -565,6 +565,25 @@

########################################
## <summary>
+## Connect to kernel using a unix
+## domain stream socket.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`kernel_stream_connect',`
+ gen_require(`
+ type kernel_t;
+ ')
+
+ allow $1 kernel_t:unix_stream_socket connectto;
+')
+
+########################################
+## <summary>
## Get information on all System V IPC objects.
## </summary>
## <param name="domain">


2012-10-17 12:46:44

by sven.vermeulen

[permalink] [raw]
Subject: [refpolicy] [PATCH] Changes to the kernel policy module

For which socket is this? Why isn't the stream_connect_pattern needed here?
On Oct 17, 2012 2:29 PM, "Dominick Grift" <[email protected]> wrote:

>
> Interface is needed by at least plymouth
>
> Signed-off-by: Dominick Grift <[email protected]>
> diff --git a/policy/modules/kernel/kernel.if
> b/policy/modules/kernel/kernel.if
> index 4bf45cb..7cbf5d6 100644
> --- a/policy/modules/kernel/kernel.if
> +++ b/policy/modules/kernel/kernel.if
> @@ -565,6 +565,25 @@
>
> ########################################
> ## <summary>
> +## Connect to kernel using a unix
> +## domain stream socket.
> +## </summary>
> +## <param name="domain">
> +## <summary>
> +## Domain allowed access.
> +## </summary>
> +## </param>
> +#
> +interface(`kernel_stream_connect',`
> + gen_require(`
> + type kernel_t;
> + ')
> +
> + allow $1 kernel_t:unix_stream_socket connectto;
> +')
> +
> +########################################
> +## <summary>
> ## Get information on all System V IPC objects.
> ## </summary>
> ## <param name="domain">
> _______________________________________________
> refpolicy mailing list
> refpolicy at oss.tresys.com
> http://oss.tresys.com/mailman/listinfo/refpolicy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.tresys.com/pipermail/refpolicy/attachments/20121017/76256525/attachment.html

2012-10-17 14:15:01

by dominick.grift

[permalink] [raw]
Subject: [refpolicy] [PATCH] Changes to the kernel policy module



On Wed, 2012-10-17 at 14:46 +0200, Sven Vermeulen wrote:
> For which socket is this? Why isn't the stream_connect_pattern needed
> here?

This is probably initramfs i believe.

There is no audit of a write to any sock file related to this

Not sure exactly why but i suspect it has do do with the fact that this
happens so early in the boot process.

> On Oct 17, 2012 2:29 PM, "Dominick Grift" <[email protected]>
> wrote:
>
> Interface is needed by at least plymouth
>
> Signed-off-by: Dominick Grift <[email protected]>
> diff --git a/policy/modules/kernel/kernel.if
> b/policy/modules/kernel/kernel.if
> index 4bf45cb..7cbf5d6 100644
> --- a/policy/modules/kernel/kernel.if
> +++ b/policy/modules/kernel/kernel.if
> @@ -565,6 +565,25 @@
>
> ########################################
> ## <summary>
> +## Connect to kernel using a unix
> +## domain stream socket.
> +## </summary>
> +## <param name="domain">
> +## <summary>
> +## Domain allowed access.
> +## </summary>
> +## </param>
> +#
> +interface(`kernel_stream_connect',`
> + gen_require(`
> + type kernel_t;
> + ')
> +
> + allow $1 kernel_t:unix_stream_socket connectto;
> +')
> +
> +########################################
> +## <summary>
> ## Get information on all System V IPC objects.
> ## </summary>
> ## <param name="domain">
> _______________________________________________
> refpolicy mailing list
> refpolicy at oss.tresys.com
> http://oss.tresys.com/mailman/listinfo/refpolicy
> _______________________________________________
> refpolicy mailing list
> refpolicy at oss.tresys.com
> http://oss.tresys.com/mailman/listinfo/refpolicy

2012-10-19 13:20:25

by cpebenito

[permalink] [raw]
Subject: [refpolicy] [PATCH] Changes to the kernel policy module

On 10/17/12 08:29, Dominick Grift wrote:
>
> Interface is needed by at least plymouth
>
> Signed-off-by: Dominick Grift <[email protected]>
> diff --git a/policy/modules/kernel/kernel.if b/policy/modules/kernel/kernel.if
> index 4bf45cb..7cbf5d6 100644
> --- a/policy/modules/kernel/kernel.if
> +++ b/policy/modules/kernel/kernel.if
> @@ -565,6 +565,25 @@
>
> ########################################
> ## <summary>
> +## Connect to kernel using a unix
> +## domain stream socket.
> +## </summary>
> +## <param name="domain">
> +## <summary>
> +## Domain allowed access.
> +## </summary>
> +## </param>
> +#
> +interface(`kernel_stream_connect',`
> + gen_require(`
> + type kernel_t;
> + ')
> +
> + allow $1 kernel_t:unix_stream_socket connectto;
> +')

Merged.

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