Skip to content
Snippets Groups Projects
Commit 11058879 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes from topic 'storaged'

* changes:
  Storaged permissions for task I/O
  Storaged permission setting
parents 164af103 e68d2d2c
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,7 @@ neverallow { ...@@ -5,6 +5,7 @@ neverallow {
-debuggerd -debuggerd
-vold -vold
-dumpstate -dumpstate
-storaged
-system_server -system_server
userdebug_or_eng(`-perfprofd') userdebug_or_eng(`-perfprofd')
} self:capability sys_ptrace; } self:capability sys_ptrace;
...@@ -13,3 +13,7 @@ allow dumpstate debugfs_tracing:dir r_dir_perms; ...@@ -13,3 +13,7 @@ allow dumpstate debugfs_tracing:dir r_dir_perms;
allow dumpstate debugfs_tracing:file rw_file_perms; allow dumpstate debugfs_tracing:file rw_file_perms;
allow dumpstate debugfs_trace_marker:file getattr; allow dumpstate debugfs_trace_marker:file getattr;
allow dumpstate atrace_exec:file rx_file_perms; allow dumpstate atrace_exec:file rx_file_perms;
allow dumpstate storaged_exec:file rx_file_perms;
# Allow dumpstate to make binder calls to storaged service
binder_call(dumpstate, storaged)
...@@ -227,6 +227,7 @@ ...@@ -227,6 +227,7 @@
/system/bin/idmap u:object_r:idmap_exec:s0 /system/bin/idmap u:object_r:idmap_exec:s0
/system/bin/update_engine u:object_r:update_engine_exec:s0 /system/bin/update_engine u:object_r:update_engine_exec:s0
/system/bin/bspatch u:object_r:update_engine_exec:s0 /system/bin/bspatch u:object_r:update_engine_exec:s0
/system/bin/storaged u:object_r:storaged_exec:s0
/system/bin/webview_zygote32 u:object_r:webview_zygote_exec:s0 /system/bin/webview_zygote32 u:object_r:webview_zygote_exec:s0
/system/bin/webview_zygote64 u:object_r:webview_zygote_exec:s0 /system/bin/webview_zygote64 u:object_r:webview_zygote_exec:s0
/system/fake-lib(64)?/libart.* u:object_r:libart_file:s0 /system/fake-lib(64)?/libart.* u:object_r:libart_file:s0
...@@ -422,6 +423,7 @@ ...@@ -422,6 +423,7 @@
############################# #############################
# debugfs files # debugfs files
# #
/sys/kernel/debug/mmc0(/.*)? u:object_r:debugfs_mmc:s0
/sys/kernel/debug/tracing(/.*)? u:object_r:debugfs_tracing:s0 /sys/kernel/debug/tracing(/.*)? u:object_r:debugfs_tracing:s0
/sys/kernel/debug/tracing/trace_marker u:object_r:debugfs_trace_marker:s0 /sys/kernel/debug/tracing/trace_marker u:object_r:debugfs_trace_marker:s0
......
...@@ -133,6 +133,7 @@ simphonebook u:object_r:radio_service:s0 ...@@ -133,6 +133,7 @@ simphonebook u:object_r:radio_service:s0
sip u:object_r:radio_service:s0 sip u:object_r:radio_service:s0
soundtrigger u:object_r:voiceinteraction_service:s0 soundtrigger u:object_r:voiceinteraction_service:s0
statusbar u:object_r:statusbar_service:s0 statusbar u:object_r:statusbar_service:s0
storaged u:object_r:storaged_service:s0
SurfaceFlinger u:object_r:surfaceflinger_service:s0 SurfaceFlinger u:object_r:surfaceflinger_service:s0
task u:object_r:task_service:s0 task u:object_r:task_service:s0
telecom u:object_r:telecom_service:s0 telecom u:object_r:telecom_service:s0
......
# storaged daemon
type storaged, domain, mlstrustedsubject;
type storaged_exec, exec_type, file_type;
init_daemon_domain(storaged)
# Write to /dev/kmsg (opened in init)
allow storaged kmsg_device:chr_file { write append };
# Read access to pseudo filesystems
allow storaged proc:dir r_dir_perms;
r_dir_file(storaged, sysfs_type)
r_dir_file(storaged, proc_net)
r_dir_file(storaged, domain)
allow storaged self:capability { setgid setuid sys_nice sys_ptrace };
userdebug_or_eng(`
# Read access to debugfs
allow storaged debugfs_mmc:dir search;
allow storaged debugfs_mmc:file r_file_perms;
')
# Binder permissions
allow storaged storaged_service:service_manager add;
binder_use(storaged)
binder_call(storaged, system_server)
###
### neverallow
###
neverallow storaged domain:process ptrace;
...@@ -57,6 +57,7 @@ type fuse, sdcard_type, fs_type, mlstrustedobject; ...@@ -57,6 +57,7 @@ type fuse, sdcard_type, fs_type, mlstrustedobject;
type sdcardfs, sdcard_type, fs_type, mlstrustedobject; type sdcardfs, sdcard_type, fs_type, mlstrustedobject;
type vfat, sdcard_type, fs_type, mlstrustedobject; type vfat, sdcard_type, fs_type, mlstrustedobject;
type debugfs, fs_type; type debugfs, fs_type;
type debugfs_mmc, fs_type, debugfs_type;
type debugfs_trace_marker, fs_type, debugfs_type, mlstrustedobject; type debugfs_trace_marker, fs_type, debugfs_type, mlstrustedobject;
type debugfs_tracing, fs_type, debugfs_type; type debugfs_tracing, fs_type, debugfs_type;
type pstorefs, fs_type; type pstorefs, fs_type;
......
...@@ -19,6 +19,7 @@ type mediadrmserver_service, service_manager_type; ...@@ -19,6 +19,7 @@ type mediadrmserver_service, service_manager_type;
type netd_service, service_manager_type; type netd_service, service_manager_type;
type nfc_service, service_manager_type; type nfc_service, service_manager_type;
type radio_service, service_manager_type; type radio_service, service_manager_type;
type storaged_service, service_manager_type;
type surfaceflinger_service, service_manager_type; type surfaceflinger_service, service_manager_type;
type system_app_service, service_manager_type; type system_app_service, service_manager_type;
type update_engine_service, service_manager_type; type update_engine_service, service_manager_type;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment