Skip to contentSkip to conversation

Common confined users can manage and relabel alsa home files.

PATCH New Dominick Grift 3 participants 4 messages Sep 16, 2010 – Sep 17, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Common confined users can manage and relabel alsa home files.

Unconditional.

---
:100644 100644 69aa742... 978edf4... M policy/modules/admin/alsa.if
:100644 100644 1854002... cfc307b... M policy/modules/roles/staff.te
:100644 100644 2a19751... c81e389... M policy/modules/roles/sysadm.te
:100644 100644 9b55b00... 763edf3... M policy/modules/roles/unprivuser.te

 policy/modules/admin/alsa.if       |   38 ++++++++++++++++++++++++++++++++++++
 policy/modules/roles/staff.te      |    5 ++++
 policy/modules/roles/sysadm.te     |    5 ++++
 policy/modules/roles/unprivuser.te |    5 ++++
 4 files changed, 53 insertions(+), 0 deletions(-)
policy/modules/admin/alsa.if +38 -0
index 69aa742..978edf4 100644
@@ -126,6 +126,44 @@ 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>
+##	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 lib files.
 ## </summary>
 ## <param name="domain">
policy/modules/roles/staff.te +5 -0
index 1854002..cfc307b 100644
@@ -15,6 +15,11 @@ userdom_unpriv_user_template(staff)
 #
 
 optional_policy(`
+	alsa_manage_home_files(staff_t)
+	alsa_relabel_home_files(staff_t)
+')
+
+optional_policy(`
 	apache_role(staff_r, staff_t)
 ')
 
policy/modules/roles/sysadm.te +5 -0
index 2a19751..c81e389 100644
@@ -62,6 +62,11 @@ tunable_policy(`allow_ptrace',`
 ')
 
 optional_policy(`
+	alsa_manage_home_files(sysadm_t)
+	alsa_relabel_home_files(sysadm_t)
+')
+
+optional_policy(`
 	amanda_run_recover(sysadm_t, sysadm_r)
 ')
 
policy/modules/roles/unprivuser.te +5 -0
index 9b55b00..763edf3 100644
@@ -13,6 +13,11 @@ role user_r;
 userdom_unpriv_user_template(user)
 
 optional_policy(`
+	alsa_manage_home_files(user_t)
+	alsa_relabel_home_files(user_t)
+')
+
+optional_policy(`
 	apache_role(user_r, user_t)
 ')
 
Signature · 9 lines
1.7.2.1

-------------- 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/20100916/49caea52/attachment.bin 
#1 lore raw

PATCH 1/1 Common confined users can manage and relabel alsa home files.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 100 lines · Dominick Grift

Unconditional.

---
:100644 100644 69aa742... 978edf4... M policy/modules/admin/alsa.if
:100644 100644 1854002... cfc307b... M policy/modules/roles/staff.te
:100644 100644 2a19751... c81e389... M policy/modules/roles/sysadm.te
:100644 100644 9b55b00... 763edf3... M policy/modules/roles/unprivuser.te

 policy/modules/admin/alsa.if       |   38 ++++++++++++++++++++++++++++++++++++
 policy/modules/roles/staff.te      |    5 ++++
 policy/modules/roles/sysadm.te     |    5 ++++
 policy/modules/roles/unprivuser.te |    5 ++++
 4 files changed, 53 insertions(+), 0 deletions(-)
policy/modules/admin/alsa.if +38 -0
index 69aa742..978edf4 100644
@@ -126,6 +126,44 @@ 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>
+##	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 lib files.
 ## </summary>
 ## <param name="domain">
policy/modules/roles/staff.te +5 -0
index 1854002..cfc307b 100644
@@ -15,6 +15,11 @@ userdom_unpriv_user_template(staff)
 #
 
 optional_policy(`
+	alsa_manage_home_files(staff_t)
+	alsa_relabel_home_files(staff_t)
+')
+
+optional_policy(`
 	apache_role(staff_r, staff_t)
 ')
 
policy/modules/roles/sysadm.te +5 -0
index 2a19751..c81e389 100644
@@ -62,6 +62,11 @@ tunable_policy(`allow_ptrace',`
 ')
 
 optional_policy(`
+	alsa_manage_home_files(sysadm_t)
+	alsa_relabel_home_files(sysadm_t)
+')
+
+optional_policy(`
 	amanda_run_recover(sysadm_t, sysadm_r)
 ')
 
policy/modules/roles/unprivuser.te +0 -0
index 9b55b00..763edf3 100644

policy/modules/roles/unprivuser.te role user_r; · line 18

Quoted 6 lines
policy/modules/roles/unprivuser.te +3 -0
@@ -13,6 +13,11 @@ role user_r;
 userdom_unpriv_user_template(user)
 
 optional_policy(`
+	alsa_manage_home_files(user_t)
+	alsa_relabel_home_files(user_t)
+')

Wouldn't it be better to put these in> userdom_unpriv_user_template

Quoted 8 lines
policy/modules/roles/unprivuser.te +2 -0
+
+optional_policy(`
 	apache_role(user_r, user_t)
 ')
 
Quoted 4 lines

_______________________________________________
refpolicy mailing list
refpolicy at oss.tresys.com
http://oss.tresys.com/mailman/listinfo/refpolicy

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkySMpcACgkQrlYvE4MpobNwygCgwNmlYmL9F01k3suhhLskW0Oo Rg0AoKO+IkaoexK30IewWYq7n8/oUOaz
=cxqk
-----END PGP SIGNATURE-----

#2 lore raw

PATCH 1/1 Common confined users can manage and relabel alsa home files.

Quoted 103 lines · Daniel J Walsh
Quoted 102 lines · Dominick Grift

Unconditional.

---
:100644 100644 69aa742... 978edf4... M policy/modules/admin/alsa.if
:100644 100644 1854002... cfc307b... M policy/modules/roles/staff.te
:100644 100644 2a19751... c81e389... M policy/modules/roles/sysadm.te
:100644 100644 9b55b00... 763edf3... M policy/modules/roles/unprivuser.te

  policy/modules/admin/alsa.if       |   38 ++++++++++++++++++++++++++++++++++++
  policy/modules/roles/staff.te      |    5 ++++
  policy/modules/roles/sysadm.te     |    5 ++++
  policy/modules/roles/unprivuser.te |    5 ++++
  4 files changed, 53 insertions(+), 0 deletions(-)
policy/modules/admin/alsa.if +38 -0
index 69aa742..978edf4 100644
@@ -126,6 +126,44 @@ 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>
+##	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 lib files.
  ##</summary>
  ##<param name="domain">
policy/modules/roles/staff.te +5 -0
index 1854002..cfc307b 100644
@@ -15,6 +15,11 @@ userdom_unpriv_user_template(staff)
  #
 
  optional_policy(`
+	alsa_manage_home_files(staff_t)
+	alsa_relabel_home_files(staff_t)
+')
+
+optional_policy(`
  	apache_role(staff_r, staff_t)
  ')
 
policy/modules/roles/sysadm.te +5 -0
index 2a19751..c81e389 100644
@@ -62,6 +62,11 @@ tunable_policy(`allow_ptrace',`
  ')
 
  optional_policy(`
+	alsa_manage_home_files(sysadm_t)
+	alsa_relabel_home_files(sysadm_t)
+')
+
+optional_policy(`
  	amanda_run_recover(sysadm_t, sysadm_r)
  ')
 
policy/modules/roles/unprivuser.te +0 -0
index 9b55b00..763edf3 100644
@@ -13,6 +13,11 @@ role user_r;
  userdom_unpriv_user_template(user)
 
Quoted 6 lines

policy/modules/roles/unprivuser.te role user_r; · line 18

Quoted 4 lines
policy/modules/roles/unprivuser.te +3 -0
  optional_policy(`
+	alsa_manage_home_files(user_t)
+	alsa_relabel_home_files(user_t)
+')

Wouldn't it be better to put these in> userdom_unpriv_user_template

If you wanted to cover all three roles, userdom_common_user_template() would be the one to use.

Signature · 3 lines
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com
#3 lore raw

PATCH 1/1 Common confined users can manage and relabel alsa home files.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 116 lines · Christopher J. PeBenito
Quoted 108 lines · Daniel J Walsh
Quoted 107 lines · Dominick Grift

Unconditional.

---

:100644 100644 69aa742... 978edf4... M    policy/modules/admin/alsa.if
:100644 100644 1854002... cfc307b... M    policy/modules/roles/staff.te
:100644 100644 2a19751... c81e389... M    policy/modules/roles/sysadm.te
:100644 100644 9b55b00... 763edf3... M   
policy/modules/roles/unprivuser.te
  policy/modules/admin/alsa.if       |   38
++++++++++++++++++++++++++++++++++++
  policy/modules/roles/staff.te      |    5 ++++
  policy/modules/roles/sysadm.te     |    5 ++++
  policy/modules/roles/unprivuser.te |    5 ++++
  4 files changed, 53 insertions(+), 0 deletions(-)
policy/modules/admin/alsa.if +38 -0
index 69aa742..978edf4 100644
@@ -126,6 +126,44 @@ 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>
+##    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 lib files.
  ##</summary>
  ##<param name="domain">
policy/modules/roles/staff.te +5 -0
index 1854002..cfc307b 100644
@@ -15,6 +15,11 @@ userdom_unpriv_user_template(staff)
  #
 
  optional_policy(`
+    alsa_manage_home_files(staff_t)
+    alsa_relabel_home_files(staff_t)
+')
+
+optional_policy(`
      apache_role(staff_r, staff_t)
  ')
 
policy/modules/roles/sysadm.te +5 -0
index 2a19751..c81e389 100644
@@ -62,6 +62,11 @@ tunable_policy(`allow_ptrace',`
  ')
 
  optional_policy(`
+    alsa_manage_home_files(sysadm_t)
+    alsa_relabel_home_files(sysadm_t)
+')
+
+optional_policy(`
      amanda_run_recover(sysadm_t, sysadm_r)
  ')
 
policy/modules/roles/unprivuser.te +0 -0
index 9b55b00..763edf3 100644
@@ -13,6 +13,11 @@ role user_r;
  userdom_unpriv_user_template(user)
 
Quoted 6 lines

policy/modules/roles/unprivuser.te role user_r; · line 18

Quoted 4 lines
policy/modules/roles/unprivuser.te +3 -0
  optional_policy(`
+    alsa_manage_home_files(user_t)
+    alsa_relabel_home_files(user_t)
+')

Wouldn't it be better to put these in> userdom_unpriv_user_template

Quoted 3 lines

If you wanted to cover all three roles, userdom_common_user_template() would be the one to use.

I believe sysadm_t can already do this anyways. But I don't like sysadm_t being used as a standard login domain. I guess I don't like it at all...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkyTaGoACgkQrlYvE4MpobNC5gCgjwqk+Fo1M+rFHhoELLze2XuM cIUAoOYHK594t0wmudQJIlLOLr2fAbVj
=upHg
-----END PGP SIGNATURE-----