Merge "logd: add "+passcred" for logdw socket"
am: cc22a8e5a2
Change-Id: I3dd68cbd2614c6900a0fd4f31c1f6ba2aa128a87
This commit is contained in:
commit
518f054bfd
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue