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