diff options
author | Tom Cherry <tomcherry@google.com> | 2019-10-22 08:27:23 -0700 |
---|---|---|
committer | Tom Cherry <tomcherry@google.com> | 2019-10-23 08:09:56 -0700 |
commit | 5310db82b012131242f723742e02426abcf1c684 (patch) | |
tree | eaee8f4c306505cfa2003b4e8dd9d57e8c9da7e5 | |
parent | 1e07245bf1505be1f0e66d88c771d2e1f007ebce (diff) | |
download | core-5310db82b012131242f723742e02426abcf1c684.tar.gz |
init: only provide control message results for devices launching > Q
This is a behavior change and may have unintended consequences,
especially in Java, where failed property sets create exceptions.
Therefore, we only provide this new behavior to devices launching > Q.
Bug: 137070994
Test: build
Change-Id: If0b44aedc5c887ea6ea16dd3ec551ac2bf793cef
-rw-r--r-- | init/property_service.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/init/property_service.cpp b/init/property_service.cpp index c6bbc1488..3baaf7c1f 100644 --- a/init/property_service.cpp +++ b/init/property_service.cpp @@ -404,7 +404,7 @@ static uint32_t SendControlMessage(const std::string& msg, const std::string& na // We must release the fd before sending it to init, otherwise there will be a race with init. // If init calls close() before Release(), then fdsan will see the wrong tag and abort(). int fd = -1; - if (socket != nullptr) { + if (socket != nullptr && SelinuxGetVendorAndroidVersion() > __ANDROID_API_Q__) { fd = socket->Release(); control_message->set_fd(fd); } |