summaryrefslogtreecommitdiff
path: root/libc/malloc_hooks/malloc_hooks.cpp
diff options
context:
space:
mode:
authorBernie Innocenti <codewiz@google.com>2018-09-05 10:53:17 +0900
committerBernie Innocenti <codewiz@google.com>2018-09-05 17:43:42 +0900
commit1b2ecee5da5241832c0b6a053a5ef658e9c76f5c (patch)
tree0701e68804f8038f7dc5a7c9da40e3e919a4bc9c /libc/malloc_hooks/malloc_hooks.cpp
parent3e5a32ce2c24969932634d84e2755755094fa582 (diff)
Prevent netd from using the libnetd_client wrappers
Netd looping connections to itself via the libnetd_client connect() wrapper has always unintended, although it worked until now. Once we move the resolver into netd, the frequency of connect() calls will increase, which makes it less acceptable. There are several ways to detect if the calling process is netd. Checking both uid == 0 and the argv[0] == netd makes it hard for non-system components to spoof as netd. Test: flash a device and check that netd logs the "Skipping..." message Test: atest netd_integration_test Change-Id: I9506facb4aa3094b16a98a913a1e2394056ce91a
Diffstat (limited to 'libc/malloc_hooks/malloc_hooks.cpp')
0 files changed, 0 insertions, 0 deletions