From f30a54b21b83f254533c59ca72ad17af5249c6be Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 3 Jul 2017 20:31:23 +0200 Subject: resolv: Introduce struct resolv_conf with extended resolver state This change provides additional resolver configuration state which is not exposed through the _res ABI. It reuses the existing initstamp field in the supposedly-private part of _res. Some effort is undertaken to avoid memory safety issues introduced by applications which directly patch the _res object. With this commit, only the initstamp field is moved into struct resolv_conf. Additional members will be added later, eventually migrating the entire resolver configuration. --- ChangeLog | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index edd0e69491..db534332da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2017-06-30 Florian Weimer + + Add extended resolver state/configuration (struct resolv_conf). + * resolv/resolv_conf.h, resolv/resolv_conf.c: New files. + * resolv/res-close.c (__res_iclose): Call __resolv_conf_detach. + * resolv/res_init.c (res_vinit_1): Do not initialize initstamp. + (__res_vinit): Call __resolv_conf_allocate and + __resolv_conf_attach. + * resolv/resolv_context.h (struct resolv_context): Add conf member + of type struct resolv_conf. + * resolv/resolv_context.c (maybe_init): Get initstamp from struct + resolv_conf. Update conf member after initialization. + * resolv/Makefile (routines): Add resolv_conf. + * resolv/bits/types/res_state.h [_LIBC] (struct __res_state): + Rename _u._ext.initstamp to _u._ext.__glibc_extension_index. + [!_LIBC] (struct __res_state): Rename _u._ext._initstamp to + _u._ext.__glibc_reserved. + 2017-06-30 Florian Weimer [BZ #21668] -- cgit 1.4.1