Skip to content
Snippets Groups Projects
Commit 33fe4784 authored by Oleksandr Peletskyi's avatar Oleksandr Peletskyi
Browse files

Modified security policy to allow user to get their own icon.

BUG: 27583869
Change-Id: I0a25bd03f3998d48dba355b91140611e38ce7b0d
parent 012763fc
No related branches found
No related tags found
No related merge requests found
......@@ -107,6 +107,9 @@ allow appdomain ringtone_file:file { getattr read write };
# Read ShortcutManager icon files (opened by system).
allow appdomain shortcut_manager_icons:file { getattr read };
# Read icon file (opened by system).
allow appdomain icon_file:file { getattr read };
# Write to /data/anr/traces.txt.
allow appdomain anr_data_file:dir search;
allow appdomain anr_data_file:file { open append };
......
......@@ -170,6 +170,8 @@ type efs_file, file_type;
type wallpaper_file, file_type, data_file_type, mlstrustedobject;
# Type for shortcut manager icon file.
type shortcut_manager_icons, file_type, data_file_type, mlstrustedobject;
# Type for user icon file.
type icon_file, file_type, data_file_type;
# /mnt/asec
type asec_apk_file, file_type, data_file_type, mlstrustedobject;
# Elements of asec files (/mnt/asec) that are world readable
......
......@@ -334,6 +334,9 @@
# /data/system_ce/0/shortcut_service/bitmaps/com.example.app/1457472879282.png
/data/system_ce/[0-9]+/shortcut_service/bitmaps(/.*)? u:object_r:shortcut_manager_icons:s0
# User icon files
/data/system/users/[0-9]+/photo.png u:object_r:icon_file:s0
#############################
# efs files
#
......
......@@ -11,6 +11,7 @@ bluetooth_domain(platform_app)
# Read from /data/local/tmp or /data/data/com.android.shell.
allow platform_app shell_data_file:dir search;
allow platform_app shell_data_file:file { open getattr read };
allow platform_app icon_file:file { open getattr read };
# Populate /data/app/vmdl*.tmp, /data/app-private/vmdl*.tmp files
# created by system server.
allow platform_app { apk_tmp_file apk_private_tmp_file }:dir rw_dir_perms;
......
......@@ -22,6 +22,9 @@ allow system_app mnt_media_rw_file:dir search;
# Read wallpaper file.
allow system_app wallpaper_file:file r_file_perms;
# Read icon file.
allow system_app icon_file:file r_file_perms;
# Write to properties
set_prop(system_app, debug_prop)
set_prop(system_app, system_prop)
......
......@@ -310,6 +310,10 @@ allow system_server shortcut_manager_icons:file create_file_perms;
allow system_server ringtone_file:dir { create_dir_perms relabelto };
allow system_server ringtone_file:file create_file_perms;
# Relabel icon file.
allow system_server icon_file:file relabelto;
allow system_server icon_file:file { rw_file_perms unlink };
# FingerprintService.java does a restorecon of the directory /data/system/users/[0-9]+/fpdata(/.*)?
allow system_server system_data_file:dir relabelfrom;
......
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