Merge "adbd: make a PR_CAPBSET_DROP error fatal." am: 57134adecb
am: 85ac05f480
* commit '85ac05f4805c3f12a923817ab4939f760ac460ca':
adbd: make a PR_CAPBSET_DROP error fatal.
diff --git a/adb/daemon/main.cpp b/adb/daemon/main.cpp
index feea7a3..218c1d0 100644
--- a/adb/daemon/main.cpp
+++ b/adb/daemon/main.cpp
@@ -54,11 +54,7 @@
}
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";
}
}