Skip to contentSkip to conversation

userdomain: man-db needs to map its 'index.db' cache

PATCH New Luis Ressel 2 participants 2 messages Sep 12, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 userdomain: man-db needs to map its 'index.db' cache

---
 policy/modules/system/miscfiles.if  | 18 ++++++++++++++++++
 policy/modules/system/userdomain.if |  2 ++
 2 files changed, 20 insertions(+)
policy/modules/system/miscfiles.if +18 -0
index e4918b471..edf1f5a09 100644
@@ -556,6 +556,24 @@ interface(`miscfiles_read_man_cache',`
 	allow $1 man_cache_t:lnk_file read_lnk_file_perms;
 ')
 
+########################################
+## <summary>
+##	Map man cache content.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`miscfiles_map_man_cache',`
+	gen_require(`
+		type man_cache_t;
+	')
+
+	allow $1 man_cache_t:file map;
+')
+
 ########################################
 ## <summary>
 ##	Create, read, write, and delete
policy/modules/system/userdomain.if +2 -0
index e4d4ca33d..a7c89e723 100644
@@ -861,6 +861,8 @@ template(`userdom_login_user_template', `
 	logging_dontaudit_getattr_all_logs($1_t)
 
 	miscfiles_read_man_pages($1_t)
+	# map is needed for man-dbs apropos program
+	miscfiles_map_man_cache($1_t)
 	# for running TeX programs
 	miscfiles_read_tetex_data($1_t)
 	miscfiles_exec_tetex_data($1_t)
Signature · 1 line
2.14.1
#1 lore raw

PATCH 1/1 userdomain: man-db needs to map its 'index.db' cache

Quoted 39 lines · Luis Ressel via refpolicy
---
  policy/modules/system/miscfiles.if  | 18 ++++++++++++++++++
  policy/modules/system/userdomain.if |  2 ++
  2 files changed, 20 insertions(+)
policy/modules/system/miscfiles.if +18 -0
index e4918b471..edf1f5a09 100644
@@ -556,6 +556,24 @@ interface(`miscfiles_read_man_cache',`
  	allow $1 man_cache_t:lnk_file read_lnk_file_perms;
  ')
 
+########################################
+## <summary>
+##	Map man cache content.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`miscfiles_map_man_cache',`
+	gen_require(`
+		type man_cache_t;
+	')
+
+	allow $1 man_cache_t:file map;
+')
+
  ########################################
  ## <summary>
  ##	Create, read, write, and delete
policy/modules/system/userdomain.if +0 -0
index e4d4ca33d..a7c89e723 100644

policy/modules/system/userdomain.if template(`userdom_login_user_template', ` · line 868

Quoted 8 lines
policy/modules/system/userdomain.if +2 -0
@@ -861,6 +861,8 @@ template(`userdom_login_user_template', `
  	logging_dontaudit_getattr_all_logs($1_t)
 
  	miscfiles_read_man_pages($1_t)
+	# map is needed for man-dbs apropos program
+	miscfiles_map_man_cache($1_t)
  	# for running TeX programs
  	miscfiles_read_tetex_data($1_t)
  	miscfiles_exec_tetex_data($1_t)

Merged.

Signature · 1 line
Chris PeBenito