diff options
author | 2020-12-04 19:22:05 +0000 | |
---|---|---|
committer | 2020-12-04 19:22:05 +0000 | |
commit | 4787c9bc59556ffb62d3b9d6c894af017d985280 (patch) | |
tree | 2ee02ab0408c3cdcfd5024cd7d6db13e15775e2c | |
parent | 5511a5181cef90a9c4491e37fe638ee87c288c5c (diff) | |
parent | c5c47be1b9ca165a582e6a2944e005f0396a245a (diff) |
Merge "Allow the System UID to unregister ConnDiags CBs." am: fcb4e29a9c am: a8f74e302c am: c5c47be1b9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1515688
Change-Id: I123cfe5c1ea8d6f466bf831e87a8a11f8cf12e25
-rw-r--r-- | services/core/java/com/android/server/ConnectivityService.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index 22134e5b408a..ee9d49244d7e 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -8200,8 +8200,10 @@ public class ConnectivityService extends IConnectivityManager.Stub final NetworkRequestInfo nri = cbInfo.mRequestInfo; - if (uid != nri.mUid) { - if (VDBG) loge("Different uid than registrant attempting to unregister cb"); + // Caller's UID must either be the registrants (if they are unregistering) or the System's + // (if the Binder died) + if (uid != nri.mUid && uid != Process.SYSTEM_UID) { + if (DBG) loge("Uid(" + uid + ") not registrant's (" + nri.mUid + ") or System's"); return; } |