diff options
Diffstat (limited to 'logd')
-rw-r--r-- | logd/LogListener.cpp | 10 | ||||
-rw-r--r-- | logd/logd.rc | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/logd/LogListener.cpp b/logd/LogListener.cpp index 709646e37..3c0d08dc6 100644 --- a/logd/LogListener.cpp +++ b/logd/LogListener.cpp @@ -119,14 +119,14 @@ int LogListener::getLogSocket() { static const char socketName[] = "logdw"; int sock = android_get_control_socket(socketName); - if (sock < 0) { + if (sock < 0) { // logd started up in init.sh sock = socket_local_server( socketName, ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_DGRAM); - } - int on = 1; - if (setsockopt(sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on)) < 0) { - return -1; + int on = 1; + if (setsockopt(sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on))) { + return -1; + } } return sock; } diff --git a/logd/logd.rc b/logd/logd.rc index 7494d8fb3..88042466b 100644 --- a/logd/logd.rc +++ b/logd/logd.rc @@ -1,7 +1,7 @@ service logd /system/bin/logd socket logd stream 0666 logd logd socket logdr seqpacket 0666 logd logd - socket logdw dgram 0222 logd logd + socket logdw dgram+passcred 0222 logd logd file /proc/kmsg r file /dev/kmsg w user logd |