Revert "Use proprety_socket_for_system if permissions allow" am: 78973da8ef
am: 30537bd10a
Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/24028889 Change-Id: Ie7d4ff74ebd72e5388016f4e897a7b88152302d9 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
7f068bb754
2 changed files with 2 additions and 8 deletions
|
@ -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 @@ class PropertyServiceConnection {
|
|||
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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue