Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb3773e4 authored by Nitin Shivpure's avatar Nitin Shivpure Committed by android-build-merger
Browse files

Merge "BT: Add CAP_NET_ADMIN for Bluetooth Process" am: 867956b5

am: 0208ab35

Change-Id: I4da38010d85b644045e64ef8b1909c7e33c19166
parents d104ed0a 0208ab35
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1160,6 +1160,7 @@ static jlong CalculateCapabilities(JNIEnv* env, jint uid, jint gid, jintArray gi
  /*
   *  Grant the following capabilities to the Bluetooth user:
   *    - CAP_WAKE_ALARM
   *    - CAP_NET_ADMIN
   *    - CAP_NET_RAW
   *    - CAP_NET_BIND_SERVICE (for DHCP client functionality)
   *    - CAP_SYS_NICE (for setting RT priority for audio-related threads)
@@ -1167,6 +1168,7 @@ static jlong CalculateCapabilities(JNIEnv* env, jint uid, jint gid, jintArray gi

  if (multiuser_get_app_id(uid) == AID_BLUETOOTH) {
    capabilities |= (1LL << CAP_WAKE_ALARM);
    capabilities |= (1LL << CAP_NET_ADMIN);
    capabilities |= (1LL << CAP_NET_RAW);
    capabilities |= (1LL << CAP_NET_BIND_SERVICE);
    capabilities |= (1LL << CAP_SYS_NICE);