Merge "adbd: make a PR_CAPBSET_DROP error fatal."

This commit is contained in:
Nick Kralevich 2015-12-16 01:46:56 +00:00 committed by Gerrit Code Review
commit 57134adecb

View file

@ -54,11 +54,7 @@ static void drop_capabilities_bounding_set_if_needed() {
}
int err = prctl(PR_CAPBSET_DROP, i, 0, 0, 0);
// Some kernels don't have file capabilities compiled in, and
// prctl(PR_CAPBSET_DROP) returns EINVAL. Don't automatically
// die when we see such misconfigured kernels.
if ((err < 0) && (errno != EINVAL)) {
if (err < 0) {
PLOG(FATAL) << "Could not drop capabilities";
}
}