Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AndroidSystemSEPolicy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Werner Sembach
AndroidSystemSEPolicy
Commits
df822f41
Commit
df822f41
authored
12 years ago
by
Kenny Root
Committed by
Gerrit Code Review
12 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Add SELinux policy for asec containers."
parents
cdfb06f5
7672eac5
No related branches found
No related tags found
No related merge requests found
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
app.te
+5
-0
5 additions, 0 deletions
app.te
domain.te
+1
-0
1 addition, 0 deletions
domain.te
file.te
+4
-1
4 additions, 1 deletion
file.te
file_contexts
+2
-1
2 additions, 1 deletion
file_contexts
installd.te
+4
-0
4 additions, 0 deletions
installd.te
vold.te
+10
-3
10 additions, 3 deletions
vold.te
with
26 additions
and
5 deletions
app.te
+
5
−
0
View file @
df822f41
...
@@ -26,6 +26,9 @@ allow platform_app shell_data_file:lnk_file read;
...
@@ -26,6 +26,9 @@ allow platform_app shell_data_file:lnk_file read;
allow platform_app apk_tmp_file:file rw_file_perms;
allow platform_app apk_tmp_file:file rw_file_perms;
# Read /dev/xt_qtaguid
# Read /dev/xt_qtaguid
allow platform_app qtaguid_device:chr_file r_file_perms;
allow platform_app qtaguid_device:chr_file r_file_perms;
# ASEC
allow platform_app asec_apk_file:dir create_dir_perms;
allow platform_app asec_apk_file:file create_file_perms;
# Apps signed with the media key.
# Apps signed with the media key.
type media_app, domain;
type media_app, domain;
...
@@ -53,6 +56,8 @@ net_domain(shared_app)
...
@@ -53,6 +56,8 @@ net_domain(shared_app)
bluetooth_domain(shared_app)
bluetooth_domain(shared_app)
# Read logs.
# Read logs.
allow shared_app log_device:chr_file read;
allow shared_app log_device:chr_file read;
# ASEC
r_dir_file(shared_app, asec_apk_file);
# Apps signed with the release key (testkey in AOSP).
# Apps signed with the release key (testkey in AOSP).
type release_app, domain;
type release_app, domain;
...
...
This diff is collapsed.
Click to expand it.
domain.te
+
1
−
0
View file @
df822f41
...
@@ -54,6 +54,7 @@ allow domain urandom_device:chr_file r_file_perms;
...
@@ -54,6 +54,7 @@ allow domain urandom_device:chr_file r_file_perms;
# Filesystem accesses.
# Filesystem accesses.
allow domain fs_type:filesystem getattr;
allow domain fs_type:filesystem getattr;
allow domain fs_type:dir getattr;
# System file accesses.
# System file accesses.
allow domain system_file:dir r_dir_perms;
allow domain system_file:dir r_dir_perms;
...
...
This diff is collapsed.
Click to expand it.
file.te
+
4
−
1
View file @
df822f41
...
@@ -32,7 +32,6 @@ type anr_data_file, file_type, data_file_type, mlstrustedobject;
...
@@ -32,7 +32,6 @@ type anr_data_file, file_type, data_file_type, mlstrustedobject;
type tombstone_data_file, file_type, data_file_type;
type tombstone_data_file, file_type, data_file_type;
# /data/app - user-installed apps
# /data/app - user-installed apps
type apk_data_file, file_type, data_file_type;
type apk_data_file, file_type, data_file_type;
type asec_data_file, file_type, data_file_type;
type apk_tmp_file, file_type, data_file_type, mlstrustedobject;
type apk_tmp_file, file_type, data_file_type, mlstrustedobject;
# /data/dalvik-cache
# /data/dalvik-cache
type dalvikcache_data_file, file_type, data_file_type;
type dalvikcache_data_file, file_type, data_file_type;
...
@@ -59,6 +58,10 @@ type cache_file, file_type, mlstrustedobject;
...
@@ -59,6 +58,10 @@ type cache_file, file_type, mlstrustedobject;
type efs_file, file_type;
type efs_file, file_type;
# Type for wallpaper file.
# Type for wallpaper file.
type wallpaper_file, file_type, mlstrustedobject;
type wallpaper_file, file_type, mlstrustedobject;
# /mnt/asec
type asec_apk_file, file_type, data_file_type;
# /data/app-asec
type asec_image_file, file_type, data_file_type;
# All devices have bluetooth efs files. But they
# All devices have bluetooth efs files. But they
# vary per device, so this type is used in per
# vary per device, so this type is used in per
...
...
This diff is collapsed.
Click to expand it.
file_contexts
+
2
−
1
View file @
df822f41
...
@@ -152,4 +152,5 @@
...
@@ -152,4 +152,5 @@
/sys/devices/platform/nfc-power/nfc_power -- u:object_r:sysfs_nfc_power_writable:s0
/sys/devices/platform/nfc-power/nfc_power -- u:object_r:sysfs_nfc_power_writable:s0
#############################
#############################
# asec containers
# asec containers
/mnt/asec(/.*)? u:object_r:asec_data_file:s0
/mnt/asec(/.*)? u:object_r:asec_apk_file:s0
/data/app-asec(/.*)? u:object_r:asec_image_file:s0
This diff is collapsed.
Click to expand it.
installd.te
+
4
−
0
View file @
df822f41
...
@@ -20,3 +20,7 @@ dontaudit installd self:capability sys_admin;
...
@@ -20,3 +20,7 @@ dontaudit installd self:capability sys_admin;
selinux_check_context(installd)
selinux_check_context(installd)
# Read /seapp_contexts, presently on the rootfs.
# Read /seapp_contexts, presently on the rootfs.
allow installd rootfs:file r_file_perms;
allow installd rootfs:file r_file_perms;
# ASEC
allow installd platform_app_data_file:lnk_file { create setattr };
allow installd app_data_file:lnk_file { create setattr };
allow installd asec_apk_file:file r_file_perms;
This diff is collapsed.
Click to expand it.
vold.te
+
10
−
3
View file @
df822f41
...
@@ -16,7 +16,7 @@ allow vold sdcard:dir create_dir_perms;
...
@@ -16,7 +16,7 @@ allow vold sdcard:dir create_dir_perms;
allow vold tmpfs:filesystem { mount unmount };
allow vold tmpfs:filesystem { mount unmount };
allow vold tmpfs:dir create_dir_perms;
allow vold tmpfs:dir create_dir_perms;
allow vold tmpfs:dir mounton;
allow vold tmpfs:dir mounton;
allow vold self:capability { net_admin dac_override mknod sys_admin };
allow vold self:capability { net_admin dac_override mknod sys_admin
chown fowner fsetid
};
allow vold self:netlink_kobject_uevent_socket *;
allow vold self:netlink_kobject_uevent_socket *;
allow vold app_data_file:dir search;
allow vold app_data_file:dir search;
allow vold app_data_file:file rw_file_perms;
allow vold app_data_file:file rw_file_perms;
...
@@ -39,7 +39,7 @@ allow vold sysfs:file rw_file_perms;
...
@@ -39,7 +39,7 @@ allow vold sysfs:file rw_file_perms;
unix_socket_connect(vold, property, init)
unix_socket_connect(vold, property, init)
# Unmount and mount the fs.
# Unmount and mount the fs.
allow vold labeledfs:filesystem { mount unmount };
allow vold labeledfs:filesystem { mount unmount
remount
};
# Access /efs/userdata_footer.
# Access /efs/userdata_footer.
# XXX Split into a separate type?
# XXX Split into a separate type?
...
@@ -53,7 +53,14 @@ allow vold kernel:system module_request;
...
@@ -53,7 +53,14 @@ allow vold kernel:system module_request;
allow vold proc:file write;
allow vold proc:file write;
# Create and mount on /data/tmp_mnt.
# Create and mount on /data/tmp_mnt.
allow vold system_data_file:dir {
open read write create add_name
mounton };
allow vold system_data_file:dir {
rw_dir_perms
mounton };
# Property Service
# Property Service
allow vold vold_prop:property_service set;
allow vold vold_prop:property_service set;
# ASEC
allow vold asec_image_file:file create_file_perms;
allow vold asec_image_file:dir rw_dir_perms;
allow vold rootfs:file r_file_perms;
allow vold asec_apk_file:dir { rw_dir_perms setattr };
allow vold asec_apk_file:file { r_file_perms setattr };
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment