resolv: Fix ABA race in /etc/resolv.conf change detection [BZ #25420]
authorFlorian Weimer <fweimer@redhat.com>
Tue, 21 Jan 2020 16:38:15 +0000 (17:38 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 14 Feb 2020 07:14:07 +0000 (08:14 +0100)
commitfa00db0a6eb755837ae5d413515e0da582b304f3
treea93122a684888db52a32b30868c0733ed229a094
parentdd0b4df329ff7ff2a656404db271c8ee8379ff9d
resolv: Fix ABA race in /etc/resolv.conf change detection [BZ #25420]

__resolv_conf_get_current should only record the initial file
change data if after verifying that file just read matches the
original measurement.  Fixes commit aef16cc8a4c670036d45590877
("resolv: Automatically reload a changed /etc/resolv.conf file
[BZ #984]").

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
resolv/resolv_conf.c