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

Commit b2425491 authored by Erik Kline's avatar Erik Kline
Browse files

Give bluetooth sufficient capabilities to run DhcpClient

Specifically:
    CAP_NET_RAW
    CAP_NET_BIND_SERVICE

Bug: 26991160
Change-Id: I2afddc9efa3b613d974afb0ea33703948203d99a
parent 111d5565
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -610,6 +610,10 @@ static jint com_android_internal_os_Zygote_nativeForkAndSpecialize(
        // Grant CAP_WAKE_ALARM and CAP_BLOCK_SUSPEND to the Bluetooth process.
        capabilities |= (1LL << CAP_WAKE_ALARM);
        capabilities |= (1LL << CAP_BLOCK_SUSPEND);
        // Allow bluetooth to open packet sockets so it can start the DHCP client.
        // TODO: consider making such functionality an RPC to netd.
        capabilities |= (1LL << CAP_NET_RAW);
        capabilities |= (1LL << CAP_NET_BIND_SERVICE);

        // Add the Bluetooth process to the system group.
        jsize length = env->GetArrayLength(reinterpret_cast<jarray>(gids));