Merge "Zygote: Fix dropping capabilities in containers" am: 7175772689 am: 03c4abdb1e

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2483735

Change-Id: Id7a27afd25cf5baab2aea785de18c987b32fc075
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Martijn Coenen
2023-03-20 10:28:10 +00:00
committed by Automerger Merge Worker

View File

@@ -721,7 +721,8 @@ public class ZygoteInit {
} catch (ErrnoException ex) {
throw new RuntimeException("Failed to capget()", ex);
}
capabilities &= ((long) data[0].effective) | (((long) data[1].effective) << 32);
capabilities &= Integer.toUnsignedLong(data[0].effective) |
(Integer.toUnsignedLong(data[1].effective) << 32);
/* Hardcoded command line to start the system server */
String[] args = {