From 343753191085db90cf56f7e81d8b8db9f591b8a7 Mon Sep 17 00:00:00 2001 From: Harikrishnan Hariharan Date: Tue, 20 Feb 2018 22:06:37 +0530 Subject: [PATCH] sanders: 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 --- config.fs | 6 ++++++ rootdir/etc/init.qcom.rc | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/config.fs b/config.fs index 93cac61..3442fee 100644 --- a/config.fs +++ b/config.fs @@ -64,6 +64,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 diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc index 61e994c..9d4f9f2 100644 --- a/rootdir/etc/init.qcom.rc +++ b/rootdir/etc/init.qcom.rc @@ -807,9 +807,9 @@ service dhcpcd_bnep4 /system/bin/dhcpcd -BKLG oneshot service vendor.loc_launcher /vendor/bin/loc_launcher - #loc_launcher will start as root and set its uid to gps class late_start - group gps inet oem_2950 wifi + user gps + group gps writepid /dev/cpuset/system-background/tasks service vendor.msm_irqbalance /vendor/bin/msm_irqbalance -f /vendor/etc/msm_irqbalance.conf