platform_bionic/libc/dns/resolv
Nick Kralevich 62c03a4ff4 Cleanup ANDROID_DNS_MODE and BIONIC_DNSCACHE
For security reasons, when a binary is executed which causes a security
transition (eg, a setuid binary, setgid binary, filesystem capabilities,
or SELinux domain transition), the AT_SECURE flag is set. This causes
certain blacklisted environment variables to be stripped before the
process is executed. The list of blacklisted environment variables is
stored in UNSAFE_VARIABLE_NAMES. Generally speaking, most environment
variables used internally by libc show up in this list.

Add ANDROID_DNS_MODE to the list of unsafe variables.
Similar to RESOLV_HOST_CONF and RES_OPTIONS (which are already
blacklisted), this variable controls how name resolution requests are
handled. Allowing ANDROID_DNS_MODE to be set across a security
boundary could induce resolution failures or otherwise impact
name resolution.

Remove BIONIC_DNSCACHE. This does not appear to be used, and setting
this variable across a security boundary could cause name resolution
problems.

Test: Android compiles and runs with no obvious problems.
Change-Id: I835a7b42d6afbc9c67866594c7951cfd9b355d81
2017-04-03 08:44:38 -07:00
..
herror.c Moved nameser.h and namser_compat.h to public include dir 2014-03-04 15:07:07 +00:00
res_cache.c Cleanup ANDROID_DNS_MODE and BIONIC_DNSCACHE 2017-04-03 08:44:38 -07:00
res_comp.c Moved nameser.h and namser_compat.h to public include dir 2014-03-04 15:07:07 +00:00
res_data.c Moved nameser.h and namser_compat.h to public include dir 2014-03-04 15:07:07 +00:00
res_debug.c Replace uses of sprintf(3) with snprintf(3). 2014-10-08 16:12:27 -07:00
res_debug.h
res_init.c Remove obsolete #include and comment. 2016-12-02 17:51:56 -08:00
res_mkquery.c Minor copyright header unification. 2016-10-24 12:57:55 -07:00
res_private.h
res_query.c Replace uses of sprintf(3) with snprintf(3). 2014-10-08 16:12:27 -07:00
res_send.c Minor copyright header unification. 2016-10-24 12:57:55 -07:00
res_state.c Remove all system properties references 2016-12-05 12:45:10 +09:00
res_stats.c Add new info functions to resolver for use by Netd. 2016-04-21 10:07:26 +09:00