diff options
author | Dianne Hackborn <hackbod@google.com> | 2012-02-09 16:12:18 -0800 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2012-02-09 18:06:01 -0800 |
commit | a573f6a1d9b12393fbdfd2c0850499973849854b (patch) | |
tree | b44ae056ae7688ef8698c42bb401d55760b9ccf5 /libs/binder | |
parent | 7ff3144aa6a4c5e6f0f64933ce174b424cfbfd6e (diff) | |
download | frameworks_base-a573f6a1d9b12393fbdfd2c0850499973849854b.zip frameworks_base-a573f6a1d9b12393fbdfd2c0850499973849854b.tar.gz frameworks_base-a573f6a1d9b12393fbdfd2c0850499973849854b.tar.bz2 |
Some hardening of isolated processes by restricting access to services.
Services now must explicitly opt in to being accessed by isolated
processes. Currently only the activity manager and surface flinger
allow this. Activity manager is needed so that we can actually
bring up the process; SurfaceFlinger is needed to be able to get the
display information for creating the Configuration. The SurfaceFlinger
should be safe because the app doesn't have access to the window
manager so can't actually get a surface to do anything with.
The activity manager now protects most of its entry points against
isolated processes.
Change-Id: I0dad8cb2c873575c4c7659c3c2a7eda8e98f46b0
Diffstat (limited to 'libs/binder')
-rw-r--r-- | libs/binder/IServiceManager.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/binder/IServiceManager.cpp b/libs/binder/IServiceManager.cpp index 33b305d..1750640 100644 --- a/libs/binder/IServiceManager.cpp +++ b/libs/binder/IServiceManager.cpp @@ -151,12 +151,14 @@ public: return reply.readStrongBinder(); } - virtual status_t addService(const String16& name, const sp<IBinder>& service) + virtual status_t addService(const String16& name, const sp<IBinder>& service, + bool allowIsolated) { Parcel data, reply; data.writeInterfaceToken(IServiceManager::getInterfaceDescriptor()); data.writeString16(name); data.writeStrongBinder(service); + data.writeInt32(allowIsolated ? 1 : 0); status_t err = remote()->transact(ADD_SERVICE_TRANSACTION, data, &reply); return err == NO_ERROR ? reply.readExceptionCode() : err; } |