Skip to content

Commit

Permalink
allow system_server to set ro.build.fingerprint
Browse files Browse the repository at this point in the history
Some devices leave "ro.build.fingerprint" undefined at build time,
since they need to build it from the components at runtime.
See https://android.googlesource.com/platform/frameworks/base/+/5568772e8161205b86905d815783505fd3d461d8
for details.

Allow system_server to set ro.build.fingerprint

Addresses the following denial/error:

  avc:  denied  { set } for property=build.fingerprint scontext=u:r:system_server:s0 tcontext=u:object_r:default_prop:s0 tclass=property_service
  init: sys_prop: permission denied uid:1000  name:ro.build.fingerprint

Bug: 18188956

(cherry picked from commit c48971f)

Change-Id: I24bc1b3405f60c9d4e16e5a995e987e54692b6aa
  • Loading branch information
nickkral committed Nov 19, 2014
1 parent afd2760 commit aaecd1e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions property.te
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ type shell_prop, property_type;
type debug_prop, property_type;
type debuggerd_prop, property_type;
type dhcp_prop, property_type;
type fingerprint_prop, property_type;
type radio_prop, property_type;
type net_radio_prop, property_type;
type system_radio_prop, property_type;
Expand Down
4 changes: 4 additions & 0 deletions property_contexts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ selinux. u:object_r:security_prop:s0
vold. u:object_r:vold_prop:s0
crypto. u:object_r:vold_prop:s0

# ro.build.fingerprint is either set in /system/build.prop, or is
# set at runtime by system_server.
build.fingerprint u:object_r:fingerprint_prop:s0

# ctl properties
ctl.bootanim u:object_r:ctl_bootanim_prop:s0
ctl.dumpstate u:object_r:ctl_dumpstate_prop:s0
Expand Down
1 change: 1 addition & 0 deletions system_server.te
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ allow system_server net_radio_prop:property_service set;
allow system_server system_radio_prop:property_service set;
allow system_server debug_prop:property_service set;
allow system_server powerctl_prop:property_service set;
allow system_server fingerprint_prop:property_service set;

# ctl interface
allow system_server ctl_default_prop:property_service set;
Expand Down

0 comments on commit aaecd1e

Please sign in to comment.