Merge "Add keychain user with special keystore access permissions"
This commit is contained in:
committed by
Android (Google) Code Review
commit
8d387d6cad
@@ -493,6 +493,7 @@ static struct user {
|
||||
{AID_VPN, AID_SYSTEM, GET},
|
||||
{AID_WIFI, AID_SYSTEM, GET},
|
||||
{AID_ROOT, AID_SYSTEM, GET},
|
||||
{AID_KEYCHAIN, AID_SYSTEM, TEST | GET | SAW},
|
||||
{~0, ~0, TEST | GET | INSERT | DELETE | EXIST | SAW},
|
||||
};
|
||||
|
||||
|
||||
@@ -91,6 +91,12 @@ public class Process {
|
||||
*/
|
||||
public static final int SDCARD_RW_GID = 1015;
|
||||
|
||||
/**
|
||||
* Defines the UID for the KeyChain service.
|
||||
* @hide
|
||||
*/
|
||||
public static final int KEYCHAIN_UID = 1020;
|
||||
|
||||
/**
|
||||
* Defines the UID/GID for the NFC service process.
|
||||
* @hide
|
||||
|
||||
@@ -153,6 +153,7 @@ public class PackageManagerService extends IPackageManager.Stub {
|
||||
private static final int RADIO_UID = Process.PHONE_UID;
|
||||
private static final int LOG_UID = Process.LOG_UID;
|
||||
private static final int NFC_UID = Process.NFC_UID;
|
||||
private static final int KEYCHAIN_UID = Process.KEYCHAIN_UID;
|
||||
static final int FIRST_APPLICATION_UID =
|
||||
Process.FIRST_APPLICATION_UID;
|
||||
static final int MAX_APPLICATION_UIDS = 1000;
|
||||
@@ -751,6 +752,10 @@ public class PackageManagerService extends IPackageManager.Stub {
|
||||
MULTIPLE_APPLICATION_UIDS
|
||||
? NFC_UID : FIRST_APPLICATION_UID,
|
||||
ApplicationInfo.FLAG_SYSTEM);
|
||||
mSettings.addSharedUserLPw("android.uid.keychain",
|
||||
MULTIPLE_APPLICATION_UIDS
|
||||
? KEYCHAIN_UID : FIRST_APPLICATION_UID,
|
||||
ApplicationInfo.FLAG_SYSTEM);
|
||||
|
||||
String separateProcesses = SystemProperties.get("debug.separate_processes");
|
||||
if (separateProcesses != null && separateProcesses.length() > 0) {
|
||||
|
||||
Reference in New Issue
Block a user