diff options
author | Robin Lee <rgl@google.com> | 2014-08-13 09:50:25 +0100 |
---|---|---|
committer | Robin Lee <rgl@google.com> | 2014-08-29 23:03:42 +0100 |
commit | f0246a8a14d69680d1776620e75a485cf963e574 (patch) | |
tree | 7fffafa3844a193de4b206605bdb59599a0318d5 /core/java/android/security | |
parent | d627eac286e377aec5c8f66d4746850c3eff8ff8 (diff) | |
download | frameworks_base-f0246a8a14d69680d1776620e75a485cf963e574.zip frameworks_base-f0246a8a14d69680d1776620e75a485cf963e574.tar.gz frameworks_base-f0246a8a14d69680d1776620e75a485cf963e574.tar.bz2 |
Keep managed profile keystores in sync with owner
Fixes setting a keyguard password for keystore in a multi-user setup
while we're at it.
Bug: 16233206.
Change-Id: I7941707ca66ac25bd122fd22e5e0f639e7af697e
Diffstat (limited to 'core/java/android/security')
-rw-r--r-- | core/java/android/security/IKeystoreService.java | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/core/java/android/security/IKeystoreService.java b/core/java/android/security/IKeystoreService.java index f8bf45b..7e9aba0 100644 --- a/core/java/android/security/IKeystoreService.java +++ b/core/java/android/security/IKeystoreService.java @@ -478,6 +478,59 @@ public interface IKeystoreService extends IInterface { } return _result; } + + public int reset_uid(int uid) throws RemoteException { + Parcel _data = Parcel.obtain(); + Parcel _reply = Parcel.obtain(); + int _result; + try { + _data.writeInterfaceToken(DESCRIPTOR); + _data.writeInt(uid); + mRemote.transact(Stub.TRANSACTION_reset_uid, _data, _reply, 0); + _reply.readException(); + _result = _reply.readInt(); + } finally { + _reply.recycle(); + _data.recycle(); + } + return _result; + } + + public int sync_uid(int srcUid, int dstUid) throws RemoteException { + Parcel _data = Parcel.obtain(); + Parcel _reply = Parcel.obtain(); + int _result; + try { + _data.writeInterfaceToken(DESCRIPTOR); + _data.writeInt(srcUid); + _data.writeInt(dstUid); + mRemote.transact(Stub.TRANSACTION_sync_uid, _data, _reply, 0); + _reply.readException(); + _result = _reply.readInt(); + } finally { + _reply.recycle(); + _data.recycle(); + } + return _result; + } + + public int password_uid(String password, int uid) throws RemoteException { + Parcel _data = Parcel.obtain(); + Parcel _reply = Parcel.obtain(); + int _result; + try { + _data.writeInterfaceToken(DESCRIPTOR); + _data.writeString(password); + _data.writeInt(uid); + mRemote.transact(Stub.TRANSACTION_password_uid, _data, _reply, 0); + _reply.readException(); + _result = _reply.readInt(); + } finally { + _reply.recycle(); + _data.recycle(); + } + return _result; + } } private static final String DESCRIPTOR = "android.security.keystore"; @@ -505,6 +558,9 @@ public interface IKeystoreService extends IInterface { static final int TRANSACTION_duplicate = IBinder.FIRST_CALL_TRANSACTION + 20; static final int TRANSACTION_is_hardware_backed = IBinder.FIRST_CALL_TRANSACTION + 21; static final int TRANSACTION_clear_uid = IBinder.FIRST_CALL_TRANSACTION + 22; + static final int TRANSACTION_reset_uid = IBinder.FIRST_CALL_TRANSACTION + 23; + static final int TRANSACTION_sync_uid = IBinder.FIRST_CALL_TRANSACTION + 24; + static final int TRANSACTION_password_uid = IBinder.FIRST_CALL_TRANSACTION + 25; /** * Cast an IBinder object into an IKeystoreService interface, generating @@ -597,4 +653,10 @@ public interface IKeystoreService extends IInterface { public int is_hardware_backed(String string) throws RemoteException; public int clear_uid(long uid) throws RemoteException; + + public int reset_uid(int uid) throws RemoteException; + + public int sync_uid(int sourceUid, int targetUid) throws RemoteException; + + public int password_uid(String password, int uid) throws RemoteException; } |