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
Loading
Please sign in to comment