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
842a9dce
Commit
842a9dce
authored
12 years ago
by
rpcraig
Committed by
Android Git Automerger
12 years ago
Browse files
Options
Downloads
Plain Diff
am
1c8464e1
: App data backup security policy.
* commit '
1c8464e1
': App data backup security policy.
parents
28866401
1c8464e1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
app.te
+7
-0
7 additions, 0 deletions
app.te
file.te
+5
-0
5 additions, 0 deletions
file.te
file_contexts
+6
-0
6 additions, 0 deletions
file_contexts
system.te
+11
-2
11 additions, 2 deletions
system.te
with
29 additions
and
2 deletions
app.te
+
7
−
0
View file @
842a9dce
...
...
@@ -201,3 +201,10 @@ r_dir_file(appdomain, isolated_app)
# are examined.
allow appdomain isolated_app:unix_stream_socket { read write };
allow isolated_app appdomain:unix_stream_socket { read write };
# Backup ability for every app. BMS opens and passes the fd
# to any app that has backup ability. Hence, no open permissions here.
allow { appdomain isolated_app } backup_data_file:file { read write };
allow { appdomain isolated_app } cache_backup_file:file { read write };
# Backup ability using 'adb backup'
allow { appdomain isolated_app } system_data_file:lnk_file getattr;
This diff is collapsed.
Click to expand it.
file.te
+
5
−
0
View file @
842a9dce
...
...
@@ -55,6 +55,9 @@ type app_data_file, file_type, data_file_type;
type platform_app_data_file, file_type, data_file_type, mlstrustedobject;
# Default type for anything under /cache
type cache_file, file_type, mlstrustedobject;
# Type for /cache/.*\.{data|restore} and default
# type for anything under /cache/backup
type cache_backup_file, file_type, mlstrustedobject;
# Default type for anything under /efs
type efs_file, file_type;
# Type for wallpaper file.
...
...
@@ -63,6 +66,8 @@ type wallpaper_file, file_type, mlstrustedobject;
type asec_apk_file, file_type, data_file_type;
# /data/app-asec
type asec_image_file, file_type, data_file_type;
# /data/backup and /data/secure/backup
type backup_data_file, file_type, data_file_type, mlstrustedobject;
# All devices have bluetooth efs files. But they
# vary per device, so this type is used in per
...
...
This diff is collapsed.
Click to expand it.
file_contexts
+
6
−
0
View file @
842a9dce
...
...
@@ -140,6 +140,8 @@
# Data files
#
/data(/.*)? u:object_r:system_data_file:s0
/data/backup(/.*)? u:object_r:backup_data_file:s0
/data/secure/backup(/.*)? u:object_r:backup_data_file:s0
/data/drm(/.*)? u:object_r:drm_data_file:s0
/data/gps(/.*)? u:object_r:gps_data_file:s0
/data/dalvik-cache(/.*)? u:object_r:dalvikcache_data_file:s0
...
...
@@ -170,6 +172,10 @@
# Cache files
#
/cache(/.*)? u:object_r:cache_file:s0
/cache/.*\.data u:object_r:cache_backup_file:s0
/cache/.*\.restore u:object_r:cache_backup_file:s0
# LocalTransport (backup) uses this directory
/cache/backup(/.*)? u:object_r:cache_backup_file:s0
#############################
# sysfs files
#
...
...
This diff is collapsed.
Click to expand it.
system.te
+
11
−
2
View file @
842a9dce
...
...
@@ -189,8 +189,8 @@ type_transition system wifi_data_file:sock_file system_wpa_socket;
allow system system_wpa_socket:sock_file create_file_perms;
# Manage cache files.
allow system cache_file:dir create_dir_perms;
allow system cache_file:file create_file_perms;
allow system cache_file:dir
{ relabelfrom
create_dir_perms
}
;
allow system cache_file:file
{ relabelfrom
create_file_perms
}
;
# Run system programs, e.g. dexopt.
allow system system_file:file x_file_perms;
...
...
@@ -212,3 +212,12 @@ allow system rild:unix_stream_socket connectto;
# connect to vpn tunnel
allow system mtp:unix_stream_socket { connectto };
# BackupManagerService lets PMS create a data backup file
allow system cache_backup_file:file create_file_perms;
# Relabel /data/backup
allow system backup_data_file:dir { relabelto relabelfrom };
# Relabel /cache/.*\.{data|restore}
allow system cache_backup_file:file { relabelto relabelfrom };
# LocalTransport creates and relabels /cache/backup
allow system cache_backup_file:dir { relabelto relabelfrom create_dir_perms };
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