Revert "Fix deadlock caused by two-threaded property controls" am: d1076eb728 am: 5164539e78
Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/24028888
Change-Id: Id6d4da7b2d253dd9875894b3825284114a11b737
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/libc/bionic/system_property_set.cpp b/libc/bionic/system_property_set.cpp
index e6a732e..f7999db 100644
--- a/libc/bionic/system_property_set.cpp
+++ b/libc/bionic/system_property_set.cpp
@@ -49,8 +49,6 @@
#include "private/ScopedFd.h"
static const char property_service_socket[] = "/dev/socket/" PROP_SERVICE_NAME;
-static const char property_service_for_system_socket[] =
- "/dev/socket/" PROP_SERVICE_FOR_SYSTEM_NAME;
static const char* kServiceVersionPropertyName = "ro.property_service.version";
class PropertyServiceConnection {
@@ -62,13 +60,10 @@
return;
}
- const char* socket = access(property_service_for_system_socket, W_OK) == 0
- ? property_service_for_system_socket
- : property_service_socket;
- const size_t namelen = strlen(socket);
+ const size_t namelen = strlen(property_service_socket);
sockaddr_un addr;
memset(&addr, 0, sizeof(addr));
- strlcpy(addr.sun_path, socket, sizeof(addr.sun_path));
+ strlcpy(addr.sun_path, property_service_socket, sizeof(addr.sun_path));
addr.sun_family = AF_LOCAL;
socklen_t alen = namelen + offsetof(sockaddr_un, sun_path) + 1;
diff --git a/libc/include/sys/_system_properties.h b/libc/include/sys/_system_properties.h
index 1afb000..943d4c6 100644
--- a/libc/include/sys/_system_properties.h
+++ b/libc/include/sys/_system_properties.h
@@ -41,7 +41,6 @@
__BEGIN_DECLS
#define PROP_SERVICE_NAME "property_service"
-#define PROP_SERVICE_FOR_SYSTEM_NAME "property_service_for_system"
#define PROP_FILENAME "/dev/__properties__"
#define PROP_MSG_SETPROP 1