All of lore.kernel.org
 help / color / mirror / Atom feed
* [refpolicy] [PATCH] Update for the gnome policy and file contexts
@ 2016-08-13 14:45 Guido Trentalancia
  2016-08-13 14:51 ` Dominick Grift
  2016-08-15 21:33 ` [refpolicy] [PATCH v2] " Guido Trentalancia
  0 siblings, 2 replies; 73+ messages in thread
From: Guido Trentalancia @ 2016-08-13 14:45 UTC (permalink / raw)
  To: refpolicy

Update for the gnome module:

- a new gstreamer_orcexec_t type and file context is introduced
  to support the OIL Runtime Compiler (ORC) optimized code
  execution (used for example by pulseaudio);
- add support for more permissions needed in gconfd_t and gnome
  keyring domains;
- add support for a few needed fs and kernel permissions. 

This patch should be applied before applying the pulseaudio patch.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
---
 policy/modules/contrib/gnome.fc |    7 ++
 policy/modules/contrib/gnome.if |   99 +++++++++++++++++++++++++++++++++++++++-
 policy/modules/contrib/gnome.te |    8 +++
 3 files changed, 112 insertions(+), 2 deletions(-)

--- refpolicy-git-06082016-orig/policy/modules/contrib/gnome.fc	2016-08-13 16:02:14.949814288 +0200
+++ refpolicy-git-06082016/policy/modules/contrib/gnome.fc	2016-08-13 16:30:32.175198600 +0200
@@ -4,6 +4,7 @@ HOME_DIR/\.gnome(/.*)?	gen_context(syste
 HOME_DIR/\.gnome2(/.*)?	gen_context(system_u:object_r:gnome_home_t,s0)
 HOME_DIR/\.gnome2/keyrings(/.*)?	gen_context(system_u:object_r:gnome_keyring_home_t,s0)
 HOME_DIR/\.gnome2_private(/.*)?	gen_context(system_u:object_r:gnome_home_t,s0)
+HOME_DIR/orcexec\..*	gen_context(system_u:object_r:gstreamer_orcexec_t,s0)
 
 /etc/gconf(/.*)?	gen_context(system_u:object_r:gconf_etc_t,s0)
 
@@ -13,4 +14,8 @@ HOME_DIR/\.gnome2_private(/.*)?	gen_cont
 /usr/bin/mate-keyring-daemon	--	gen_context(system_u:object_r:gkeyringd_exec_t,s0)
 
 /usr/lib/[^/]*/gconf/gconfd-2	--	gen_context(system_u:object_r:gconfd_exec_t,s0)
-/usr/libexec/gconfd-2	--	gen_context(system_u:object_r:gconfd_exec_t,s0)
+
+/usr/libexec/gconfd-2		--	gen_context(system_u:object_r:gconfd_exec_t,s0)
+
+/var/run/user/[^/]*/orcexec\..*	gen_context(system_u:object_r:gstreamer_orcexec_t,s0)
+/var/run/user/%{USERID}/orcexec\..*	gen_context(system_u:object_r:gstreamer_orcexec_t,s0)
--- refpolicy-git-06082016-orig/policy/modules/contrib/gnome.if	2016-08-13 16:02:14.950814302 +0200
+++ refpolicy-git-06082016/policy/modules/contrib/gnome.if	2016-08-13 00:55:24.980149003 +0200
@@ -1,4 +1,4 @@
-## <summary>GNU network object model environment.</summary>
+
 
 ########################################
 ## <summary>
@@ -100,9 +100,15 @@ template(`gnome_role_template',`
 
 	allow $3 gnome_keyring_tmp_t:sock_file { relabel_sock_file_perms manage_sock_file_perms };
 
+	userdom_manage_user_home_content_dirs($1_gkeyringd_t)
+	userdom_manage_user_home_content_files($1_gkeyringd_t)
+	userdom_manage_user_home_content_sockets($1_gkeyringd_t)
+
 	ps_process_pattern($3, $1_gkeyringd_t)
 	allow $3 $1_gkeyringd_t:process { ptrace signal_perms };
 
+	kernel_read_kernel_sysctls($1_gkeyringd_t)
+
 	corecmd_bin_domtrans($1_gkeyringd_t, $3)
 	corecmd_shell_domtrans($1_gkeyringd_t, $3)
 
@@ -569,6 +575,36 @@ interface(`gnome_home_filetrans_gnome_ho
 
 ########################################
 ## <summary>
+##	Create objects in user home
+##	directories with the gstreamer
+##	orcexec type.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+## <param name="object_class">
+##	<summary>
+##	Class of the object being created.
+##	</summary>
+## </param>
+## <param name="name" optional="true">
+##	<summary>
+##	The name of the object being created.
+##	</summary>
+## </param>
+#
+interface(`gnome_home_filetrans_gstreamer_orcexec',`
+	gen_require(`
+		type gstreamer_orcexec_t;
+	')
+
+	userdom_user_home_dir_filetrans($1, gstreamer_orcexec_t, $2, $3)
+')
+
+########################################
+## <summary>
 ##	Create objects in gnome gconf home
 ##	directories with a private type.
 ## </summary>
@@ -603,6 +639,67 @@ interface(`gnome_gconf_home_filetrans',`
 ')
 
 ########################################
+## <summary>
+##	Create objects in the user
+##	runtime directories with the
+##	gstreamer orcexec type.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+## <param name="object_class">
+##	<summary>
+##	Class of the object being created.
+##	</summary>
+## </param>
+## <param name="name" optional="true">
+##	<summary>
+##	The name of the object being created.
+##	</summary>
+## </param>
+#
+interface(`gnome_user_runtime_filetrans_gstreamer_orcexec',`
+	gen_require(`
+		type gstreamer_orcexec_t;
+	')
+
+	userdom_user_runtime_filetrans($1, gstreamer_orcexec_t, $2, $3)
+')
+
+
+########################################
+## <summary>
+##	Create objects in the tmp
+##	directories with the gstreamer
+##	orcexec type.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+## <param name="object_class">
+##	<summary>
+##	Class of the object being created.
+##	</summary>
+## </param>
+## <param name="name" optional="true">
+##	<summary>
+##	The name of the object being created.
+##	</summary>
+## </param>
+#
+interface(`gnome_tmp_filetrans_gstreamer_orcexec',`
+	gen_require(`
+		type gstreamer_orcexec_t;
+	')
+
+	files_tmp_filetrans($1, gstreamer_orcexec_t, $2, $3)
+')
+
+########################################
 ## <summary>
 ##	Read generic gnome keyring home files.
 ## </summary>
--- refpolicy-git-06082016-orig/policy/modules/contrib/gnome.te	2016-08-13 16:02:14.951814316 +0200
+++ refpolicy-git-06082016/policy/modules/contrib/gnome.te	2016-08-13 13:45:54.704254788 +0200
@@ -46,6 +46,9 @@ userdom_user_home_content(gnome_keyring_
 type gnome_keyring_tmp_t;
 userdom_user_tmp_file(gnome_keyring_tmp_t)
 
+type gstreamer_orcexec_t;
+application_executable_file(gstreamer_orcexec_t)
+
 ##############################
 #
 # Common local Policy
@@ -87,8 +90,13 @@ manage_dirs_pattern(gconfd_t, gconf_tmp_
 manage_files_pattern(gconfd_t, gconf_tmp_t, gconf_tmp_t)
 userdom_user_tmp_filetrans(gconfd_t, gconf_tmp_t, { dir file })
 
+kernel_dontaudit_read_system_state(gconfd_t)
+
+fs_getattr_xattr_fs(gconfd_t)
+
 userdom_manage_user_tmp_dirs(gconfd_t)
 userdom_tmp_filetrans_user_tmp(gconfd_t, dir)
+userdom_manage_user_tmp_sockets(gconfd_t)
 userdom_user_runtime_filetrans_user_tmp(gconfd_t, dir)
 
 optional_policy(`

^ permalink raw reply	[flat|nested] 73+ messages in thread

end of thread, other threads:[~2016-09-06 12:26 UTC | newest]

Thread overview: 73+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-13 14:45 [refpolicy] [PATCH] Update for the gnome policy and file contexts Guido Trentalancia
2016-08-13 14:51 ` Dominick Grift
2016-08-13 20:09   ` Guido Trentalancia
2016-08-13 20:20     ` Dominick Grift
2016-08-14 17:35     ` Guido Trentalancia
2016-08-14 17:45       ` Dominick Grift
2016-08-14 21:14   ` Guido Trentalancia
2016-08-14 21:19     ` Dominick Grift
2016-08-14 21:33       ` Guido Trentalancia
2016-08-14 21:35         ` Dominick Grift
2016-08-14 22:13   ` Guido Trentalancia
2016-08-15  6:00     ` Dominick Grift
2016-08-15  8:29       ` Dominick Grift
2016-08-16 19:26         ` Guido Trentalancia
2016-08-16 19:30           ` Dominick Grift
2016-08-15 21:33 ` [refpolicy] [PATCH v2] " Guido Trentalancia
2016-08-15 20:08   ` Chris PeBenito
2016-08-20 14:52   ` [refpolicy] [PATCH v3] " Guido Trentalancia
2016-08-21 18:49     ` Dominick Grift
2016-08-21 19:02       ` Guido Trentalancia
2016-08-21 19:05         ` Dominick Grift
2016-08-21 19:44           ` Guido Trentalancia
2016-08-22 19:39     ` [refpolicy] [PATCH v4] " Guido Trentalancia
2016-08-23  1:15       ` Chris PeBenito
2016-08-23 12:44         ` Guido Trentalancia
2016-08-23 13:58           ` Guido Trentalancia
2016-08-23 23:02           ` Chris PeBenito
2016-08-23 23:31             ` Guido Trentalancia
2016-08-24 21:55             ` Guido Trentalancia
2016-08-24 22:10               ` Chris PeBenito
2016-08-24 22:42                 ` Guido Trentalancia
2016-08-25  7:25                   ` Dominick Grift
2016-08-25  9:47                 ` Guido Trentalancia
2016-08-25 22:49                   ` Chris PeBenito
2016-08-26 22:21                     ` Guido Trentalancia
2016-08-28 18:29                       ` Chris PeBenito
2016-08-27 17:08                 ` Guido Trentalancia
2016-08-27 17:10                   ` Dominick Grift
2016-08-27 17:16                     ` Guido Trentalancia
2016-08-27 17:17                       ` Dominick Grift
2016-08-27 20:41                         ` Guido Trentalancia
2016-08-27 20:57                           ` Dominick Grift
2016-08-27 21:48                             ` Guido Trentalancia
2016-08-28  7:24                               ` Dominick Grift
2016-08-28  8:03                                 ` Dominick Grift
2016-08-28 15:37                                   ` Guido Trentalancia
2016-08-28 18:40                                     ` Chris PeBenito
2016-08-28 19:11                                       ` Guido Trentalancia
2016-08-28 19:12                                       ` Dominick Grift
2016-08-29  8:20                                         ` Dominick Grift
2016-08-29 17:45                                           ` Naftuli Tzvi Kay
2016-08-30 19:23                                       ` Guido Trentalancia
2016-08-30 21:37                                         ` Chris PeBenito
2016-08-30 21:46                                           ` Guido Trentalancia
2016-08-30 19:15                             ` Guido Trentalancia
2016-08-30 19:21                               ` Dominick Grift
2016-08-30 21:39                                 ` Chris PeBenito
2016-08-31  6:55                                   ` Dominick Grift
2016-08-31  7:31                                     ` Dominick Grift
2016-08-23 16:06         ` Guido Trentalancia
2016-09-01  4:20       ` Jason Zaman
2016-09-01  9:33         ` Guido Trentalancia
2016-09-01 11:53           ` Jason Zaman
2016-09-01 12:28             ` Guido Trentalancia
2016-09-01 14:06               ` Jason Zaman
2016-09-01 14:40                 ` Guido Trentalancia
2016-09-01 15:21                   ` Jason Zaman
2016-09-01 16:18                     ` Guido Trentalancia
2016-09-01 19:30                     ` Guido Trentalancia
2016-09-02  1:12                       ` Jason Zaman
2016-09-03 13:34                     ` Guido Trentalancia
2016-09-06  9:18                       ` Jason Zaman
2016-09-06 12:26                         ` Guido Trentalancia

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.