platform_system_security/keystore2/keystore2.rc
Janis Danisevskis 9402f2775b Keystore 2.0: Start keystore2 daemon conditionally.
This patch makes the keystore2 daemon start conditionally based on the
platform property ro.android.system.keystore2.enable.
This is patch can be reverted when the Keystore 2.0 migration is
complete. b/171563717

Bug: 171563717
Bug: 171305684
Test: The keystore2 daemon is running if the property
      ro.android.system.keystore2.enable is set and true
      and not running otherwise.
Change-Id: I2b3d6c70f45f3dafb9edb6f2f6960be94e13ed20
2020-10-23 11:14:52 -07:00

20 lines
776 B
Text

# Start the keystore2 service.
# Keystore 2.0 changes its working directory to the first positional
# command line option, i.e., /data/misc/keystore, where it stores its
# database.
# Keystore shall run as user keystore and groups keystore, readproc, and log.
#
# See system/core/init/README.md for information on the init.rc language.
# Start Keystore 2 conditionally
# TODO b/171563717 Remove when Keystore 2 migration is complete.
on nonencrypted && property:ro.android.security.keystore2.enable=true
enable keystore2
service keystore2 /system/bin/keystore2 /data/misc/keystore
class main
user keystore
group keystore readproc log
writepid /dev/cpuset/foreground/tasks
# TODO b/171563717 Remove when Keystore 2 migration is complete.
disabled