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
e94ee1da
Commit
e94ee1da
authored
11 years ago
by
Nick Kralevich
Committed by
Android Git Automerger
11 years ago
Browse files
Options
Downloads
Plain Diff
am
cd905ec0
: Protect keystore\'s files.
* commit '
cd905ec0
': Protect keystore's files.
parents
48073591
cd905ec0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
init.te
+5
-0
5 additions, 0 deletions
init.te
installd.te
+3
-3
3 additions, 3 deletions
installd.te
keystore.te
+12
-0
12 additions, 0 deletions
keystore.te
system_server.te
+2
-2
2 additions, 2 deletions
system_server.te
unconfined.te
+2
-2
2 additions, 2 deletions
unconfined.te
with
24 additions
and
7 deletions
init.te
+
5
−
0
View file @
e94ee1da
...
...
@@ -23,3 +23,8 @@ allow init recovery:process transition;
allow init shell:process transition;
allow init ueventd:process transition;
allow init watchdogd:process transition;
# Init creates keystore's directory on boot, and walks through
# the directory as part of a recursive restorecon.
allow init keystore_data_file:dir { open create read getattr setattr search };
allow init keystore_data_file:file { getattr };
This diff is collapsed.
Click to expand it.
installd.te
+
3
−
3
View file @
e94ee1da
...
...
@@ -11,9 +11,9 @@ allow installd system_data_file:lnk_file create;
allow installd dalvikcache_data_file:file create_file_perms;
allow installd dalvikcache_profiles_data_file:dir create_dir_perms;
allow installd dalvikcache_profiles_data_file:file create_file_perms;
allow installd data_file_type:dir create_dir_perms;
allow installd data_file_type:dir { relabelfrom relabelto };
allow installd data_file_type:{ file_class_set } { getattr unlink };
allow installd
{
data_file_type
-keystore_data_file }
:dir create_dir_perms;
allow installd
{
data_file_type
-keystore_data_file }
:dir { relabelfrom relabelto };
allow installd
{
data_file_type
-keystore_data_file }
:{ file_class_set } { getattr unlink };
allow installd apk_data_file:file r_file_perms;
allow installd apk_tmp_file:file r_file_perms;
allow installd oemfs:dir r_dir_perms;
...
...
This diff is collapsed.
Click to expand it.
keystore.te
+
12
−
0
View file @
e94ee1da
...
...
@@ -11,3 +11,15 @@ allow keystore keystore_data_file:notdevfile_class_set create_file_perms;
allow keystore keystore_exec:file { getattr };
allow keystore tee_device:chr_file rw_file_perms;
allow keystore tee:unix_stream_socket connectto;
###
### Neverallow rules
###
### Protect our files from others
###
neverallow { domain -keystore } keystore_data_file:dir ~{ open create read getattr setattr search relabelto };
neverallow { domain -keystore } keystore_data_file:notdevfile_class_set ~{ relabelto getattr };
neverallow { domain -keystore -init -kernel -recovery } keystore_data_file:dir *;
neverallow { domain -keystore -init -kernel -recovery } keystore_data_file:notdevfile_class_set *;
This diff is collapsed.
Click to expand it.
system_server.te
+
2
−
2
View file @
e94ee1da
...
...
@@ -168,8 +168,8 @@ allow system_server adbd_socket:sock_file rw_file_perms;
allow system_server tun_device:chr_file rw_file_perms;
# Manage data files.
allow system_server data_file_type:dir create_dir_perms;
allow system_server data_file_type:notdevfile_class_set create_file_perms;
allow system_server
{
data_file_type
-keystore_data_file }
:dir create_dir_perms;
allow system_server
{
data_file_type
-keystore_data_file }
:notdevfile_class_set create_file_perms;
# Read /file_contexts and /data/security/file_contexts
security_access_policy(system_server)
...
...
This diff is collapsed.
Click to expand it.
unconfined.te
+
2
−
2
View file @
e94ee1da
...
...
@@ -28,10 +28,10 @@ allow unconfineddomain domain:{ fifo_file file } rw_file_perms;
allow unconfineddomain domain:socket_class_set *;
allow unconfineddomain domain:ipc_class_set *;
allow unconfineddomain domain:key *;
allow unconfineddomain {fs_type dev_type file_type}:{ dir lnk_file sock_file fifo_file } ~relabelto;
allow unconfineddomain {fs_type dev_type file_type
-keystore_data_file
}:{ dir lnk_file sock_file fifo_file } ~relabelto;
allow unconfineddomain {fs_type -usermodehelper -proc_security}:{ chr_file file } ~{entrypoint execmod execute relabelto};
allow unconfineddomain {dev_type -kmem_device}:{ chr_file file } ~{entrypoint execmod execute relabelto};
allow unconfineddomain file_type:{ chr_file file } ~{entrypoint execmod execute relabelto};
allow unconfineddomain
{
file_type
-keystore_data_file}
:{ chr_file file } ~{entrypoint execmod execute relabelto};
allow unconfineddomain { rootfs system_file exec_type }:file execute;
allow unconfineddomain node_type:node *;
allow unconfineddomain node_type:{ tcp_socket udp_socket rawip_socket } node_bind;
...
...
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