Skip to contentSkip to conversation

Allow common users to manage and relabel Alsa home files.

PATCH New Dominick Grift 1 participant 1 message Sep 22, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 Allow common users to manage and relabel Alsa home files.

---
:100644 100644 69aa742... 90d5203... M policy/modules/admin/alsa.if
:100644 100644 b575edd... 35f1476... M policy/modules/system/userdomain.if

 policy/modules/admin/alsa.if        |   38 +++++++++++++++++++++++++++++++++++
 policy/modules/system/userdomain.if |    2 +
 2 files changed, 40 insertions(+), 0 deletions(-)
policy/modules/admin/alsa.if +38 -0
index 69aa742..90d5203 100644
@@ -107,6 +107,25 @@ interface(`alsa_manage_rw_config',`
 
 ########################################
 ## <summary>
+##	Manage alsa home files.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`alsa_manage_home_files',`
+	gen_require(`
+		type alsa_home_t;
+	')
+
+	userdom_search_user_home_dirs($1)
+	allow $1 alsa_home_t:file manage_file_perms;
+')
+
+########################################
+## <summary>
 ##	Read Alsa home files.
 ## </summary>
 ## <param name="domain">
@@ -126,6 +145,25 @@ interface(`alsa_read_home_files',`
 
 ########################################
 ## <summary>
+##	Relabel alsa home files.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`alsa_relabel_home_files',`
+	gen_require(`
+		type alsa_home_t;
+	')
+
+	userdom_search_user_home_dirs($1)
+	allow $1 alsa_home_t:file relabel_file_perms;
+')
+
+########################################
+## <summary>
 ##	Read Alsa lib files.
 ## </summary>
 ## <param name="domain">
policy/modules/system/userdomain.if +2 -0
index b575edd..35f1476 100644
@@ -574,7 +574,9 @@ template(`userdom_common_user_template',`
 	')
 
 	optional_policy(`
+		alsa_manage_home_files($1_t)
 		alsa_read_rw_config($1_t)
+		alsa_relabel_home_files($1_t)
 	')
 
 	optional_policy(`
Signature · 9 lines
1.7.2.3

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20100922/38f0b5a9/attachment.bin