wayne-common: Start loc_launcher as gps user

Start loc_launcher as gps user and set uid/gid of loc_launcher
to gps and enable SETUID and SETGID caps for loc_launcher, so
that we can start loc_launcher as gps user instead of root and
still have capabilities for SETUID and SETGID. Also remove not
required permissions groups for loc_launcher.

Change-Id: Ie9f1506874b3c3148f9170c8d5db9afd1e70025c
CRs-Fixed: 2192881
This commit is contained in:
Harikrishnan Hariharan 2018-02-20 22:06:37 +05:30 committed by Isaac Chen
parent 46133ac465
commit b44c16f9b5
2 changed files with 8 additions and 2 deletions

View file

@ -127,6 +127,12 @@ user: AID_GPS
group: AID_GPS
caps: NET_BIND_SERVICE
[vendor/bin/loc_launcher]
mode: 0755
user: AID_GPS
group: AID_GPS
caps: SETUID SETGID
[vendor/bin/xtwifi-client]
mode: 0755
user: AID_GPS

View file

@ -630,9 +630,9 @@ on property:sys.shutdown.requested=*
stop vendor.cnss-daemon
service vendor.loc_launcher /system/vendor/bin/loc_launcher
#loc_launcher will start as root and set its uid to gps
class late_start
group gps inet diag wifi
user gps
group gps
on property:crypto.driver.load=1
insmod /system/lib/modules/qce.ko