Skip to contentSkip to conversation

I have modified the policy for installd over app_data_file

PATCH In review Haiqing Jiang 2 participants 3 messages Jul 23, 2012 – Jul 24, 2012 SELinux security module

lore
Share & tools
lore
#0 lore raw

[PATCH 1/1] external/sepolicy: install daemon unlink application data files According to the comments from Stephen, I modify the permissions to "unlink only".

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#1 lore raw

PATCH 1/1 external/sepolicy: install daemon unlink application data files

From: hqjiang <[email protected]>

---
 installd.te |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
installd.te +2 -0
index 466125e..ce9122b 100644
@@ -20,3 +20,5 @@ dontaudit installd self:capability sys_admin;
 selinux_check_context(installd)
 # Read /seapp_contexts, presently on the rootfs.
 allow installd rootfs:file r_file_perms;
+# Unlink app_data_file
+allow installd app_data_file:lnk_file unlink;
Signature · 7 lines
1.7.0.4


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#2 lore raw

Re: [PATCH 1/1] external/sepolicy: install daemon unlink application data files

Quoted 5 lines · Haiqing Jiang

From: hqjiang <[email protected]>

---
 installd.te |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Applied. However notice that you could have done this more generally by using the data_file_type attribute or even combining into the earlier rule, e.g.
-allow installd data_file_type:file { getattr unlink }; +allow installd data_file_type:{ file lnk_file } { getattr unlink };

Quoted 11 lines
installd.te +2 -0
index 466125e..ce9122b 100644
@@ -20,3 +20,5 @@ dontaudit installd self:capability sys_admin;
 selinux_check_context(installd)
 # Read /seapp_contexts, presently on the rootfs.
 allow installd rootfs:file r_file_perms;
+# Unlink app_data_file
+allow installd app_data_file:lnk_file unlink;
Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.