Don't pass pid to dnsproxyd
dnsproxyd can already determine our pid by looking at our
socket connection. It's dangerous (and unneeded) to pass it
ourselves.
Change-Id: I2596d02e361b302259ddb084be2fb75be59889c5
diff --git a/libc/netbsd/gethnamaddr.c b/libc/netbsd/gethnamaddr.c
index 1ab987e..04b1f54 100644
--- a/libc/netbsd/gethnamaddr.c
+++ b/libc/netbsd/gethnamaddr.c
@@ -756,8 +756,7 @@
/* This is writing to system/netd/DnsProxyListener.cpp and changes
* here need to be matched there */
- if (fprintf(proxy, "gethostbyname %d %s %s %d",
- getpid(),
+ if (fprintf(proxy, "gethostbyname %s %s %d",
iface == NULL ? "^" : iface,
name == NULL ? "^" : name,
af) < 0) {
@@ -791,8 +790,8 @@
const char * addrStr = inet_ntop(af, addr, buf, sizeof(buf));
if (addrStr == NULL) goto exit;
- if (fprintf(proxy, "gethostbyaddr %s %d %d %d %s",
- addrStr, len, af, getpid(), iface == NULL ? "^" : iface) < 0) {
+ if (fprintf(proxy, "gethostbyaddr %s %d %d %s",
+ addrStr, len, af, iface == NULL ? "^" : iface) < 0) {
goto exit;
}