Uid Sandboxing of Pullers
Overall flow of implementation: 1. parsing the config in MetricsManager to store the uids per atom. It follows the mAllowedLogSources logic very closely 2. MetricsManager register itself as a PullUidProvider with the PullerManager. 3. Metrics pass the config key when pulling (for both registering receivers and normal pulls) , and the puller manager gets the allowed uids from the PullUidProvider for that config. 4. PullerManager keys receivers by <atomId, configKey> so that it can look up the uids for that atom using the PullUidProvider as well. 5. Added shell subscriber support. Hardcode a default of AID_SYSTEM for them and also allow packages per atom. This involved adding a second interface to Pull that simply accepts the uids, since I didnt want to make the ShellSubscriber a PullUidProvider as well. 6. Change adb shell cmd stats pull-source to allow users to specify a package. Default to AID_SYSTEM as well. Notes: The feature is flagged off right now, since configs do not pass in the desired package. Another approach could be to hardcode in the current mapping, but that doesn't work for OEM pulled atoms. Test: m statsd Test: bit statsd_test:* with useUids = false Test: bit statsd_test:* with useUids = true Bug: 144099783 Bug: 151978258 Change-Id: I4a7481d7402a52b9beb4ea28b102803f9e50e79f
Loading
Please register or sign in to comment