diff options
author | Mark Salyzyn <salyzyn@google.com> | 2017-05-09 01:09:06 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-05-09 01:09:06 +0000 |
commit | ff04ade5e4135f6f3942ea3ab0ca3f47ffdc3122 (patch) | |
tree | ac61811462f26641532d61ad5461b053a17cdfcf /logd | |
parent | 3286188539c47481edc31bf785974a846ea83747 (diff) | |
parent | 518f054bfd05f582a430f347fc5c1e82f3c7c8e7 (diff) | |
download | core-ff04ade5e4135f6f3942ea3ab0ca3f47ffdc3122.tar.gz core-ff04ade5e4135f6f3942ea3ab0ca3f47ffdc3122.tar.bz2 core-ff04ade5e4135f6f3942ea3ab0ca3f47ffdc3122.zip |
Merge "logd: add "+passcred" for logdw socket" am: cc22a8e5a2
am: 518f054bfd
Change-Id: I720ff1aa0bc6726220d2f6db9bfa287e3be18c0e
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 |