Systemd/src
Giedrius Statkevičius aa5408e2e8 resolve: reload /etc/hosts on inode change
On certain distributions such as NixOS the mtime of `/etc/hosts` is
locked to a fixed value. In such cases, only checking the last mtime of
`/etc/hosts` is not enough - we also need to check if the st_ino/st_dev
match up. Thus, let's make sure make sure that systemd-resolved also
rereads `/etc/hosts` if the inode or the device containing `/etc/hosts` changes.

Test script:

```bash
hosts="/etc/hosts"
echo "127.0.0.1 testpr" > "hosts_new"
mv "hosts_new" "$hosts"
resolvectl query testpr || exit 1
mtime="$(stat -c %y "$hosts")"
echo "127.0.0.1 newhost" > "hosts_tmp"
touch -d "$mtime" "hosts_tmp"
install -p "hosts_tmp" "$hosts"
sleep 10
resolvectl query newhost || exit 1
rm -f "hosts_tmp"
```

Closes #14456.
2020-04-03 17:34:10 +02:00
..
ac-power
activate util-lib: move things that parse ifnames to shared/ 2020-01-11 12:07:28 +01:00
analyze analyze: fix table time output 2020-03-09 14:58:25 +01:00
ask-password
backlight
basic string-util: make clear that split() + FOREACH_WORD() should die 2020-04-02 16:43:39 +02:00
binfmt
boot *: use _cleanup_close_ with fdopen() where trivial 2020-03-31 06:48:03 -07:00
busctl systemd: Fix busctl crash on aarch64 when setting output table format 2020-02-16 02:09:26 +09:00
cgls
cgroups-agent
cgtop
core *: use _cleanup_close_ with fdopen() where trivial 2020-03-31 06:48:03 -07:00
coredump *: use _cleanup_close_ with fdopen() where trivial 2020-03-31 06:48:03 -07:00
cryptsetup units: introduce blockdev@.target for properly ordering mounts/swaps against cryptsetup 2020-01-21 20:23:13 +01:00
debug-generator initrd: fix systemd.debug-shell & friends 2019-12-03 14:48:27 +01:00
delta
detect-virt
dissect dissect: add --fsck= option to systemd-dissect tool 2020-01-29 19:29:52 +01:00
environment-d-generator sd-path: rename the two functions 2020-03-27 20:12:44 +01:00
escape
firstboot firstboot: add missing check 2020-02-06 09:52:39 +01:00
fsck
fstab-generator fstab-generator: handle systemd.swap= command-line argument 2020-03-12 17:52:43 +01:00
fuzz ci: turn off FuzzBuzz 2020-03-30 14:57:22 +02:00
getty-generator
gpt-auto-generator units: introduce blockdev@.target for properly ordering mounts/swaps against cryptsetup 2020-01-21 20:23:13 +01:00
hibernate-resume Fix generator name in hibernate-resume-generator's drop-in 2020-02-04 14:49:04 +09:00
home Merge pull request #15278 from vcaputo/more-trivial-cleanups 2020-04-01 00:16:56 +02:00
hostname shared: split out polkit stuff from bus-util.c → bus-polkit.c 2020-01-22 12:34:10 +01:00
hwdb
id128 id128: change table header from "uuid" to just "id" 2020-01-29 15:32:26 +01:00
import import: Only keep RO copy if ETag header is set 2020-03-23 21:39:59 -07:00
initctl initctl: (void)ify epoll_ctl() 2020-01-10 10:06:09 +01:00
journal *: use _cleanup_close_ with fdopendir() where trivial 2020-03-31 06:48:03 -07:00
journal-remote *: use _cleanup_close_ with fdopen() where trivial 2020-03-31 06:48:03 -07:00
kernel-install treewide: more portable bash shebangs 2020-03-05 17:27:07 +01:00
libsystemd sd-bus: add va_list variants of variadic convenience functions 2020-04-02 10:26:18 +02:00
libsystemd-network Merge pull request #15252 from ssahani/dhcpv6-mud 2020-04-02 10:23:15 +02:00
libudev
locale shared: split out polkit stuff from bus-util.c → bus-polkit.c 2020-01-22 12:34:10 +01:00
login login: allow non-console sessions to change vt 2020-03-19 09:29:23 +01:00
machine *: convert amenable fdopen calls to take_fdopen 2020-03-31 06:48:03 -07:00
machine-id-setup
modules-load
mount systemd: Fix busctl crash on aarch64 when setting output table format 2020-02-16 02:09:26 +09:00
network Merge pull request #15210 from ssahani/networkctl-up-down 2020-04-02 11:21:25 +02:00
notify notify: add color to --help 2019-11-28 11:41:24 +01:00
nspawn *: convert amenable fdopendir() calls to take_fdopendir() 2020-03-31 06:48:03 -07:00
nss-myhostname
nss-mymachines
nss-resolve
nss-systemd nss-systemd: use _cleanup_ for pthread_mutex_{lock,unlock} 2020-03-28 17:03:21 +01:00
partition test: convert TEST-45 to a normal meson test 2020-03-28 11:50:38 +01:00
path path: log at debug level when we can't query a variable 2020-03-27 20:12:45 +01:00
portable *: convert amenable fdopen calls to take_fdopen 2020-03-31 06:48:03 -07:00
pstore
quotacheck
random-seed random-seed: add missing header for GRND_NONBLOCK (#14988) 2020-03-02 14:48:21 +09:00
rc-local-generator
remount-fs
reply-password
resolve resolve: reload /etc/hosts on inode change 2020-04-03 17:34:10 +02:00
rfkill
run
run-generator core: use SPECIAL_DEFAULT_TARGET more 2019-11-28 09:13:45 +01:00
shared *: convert amenable fdopen calls to take_fdopen 2020-03-31 06:48:03 -07:00
shutdown Merge pull request #13084 from ddstreet/log_time 2020-03-30 17:57:34 +02:00
sleep sleep: automatically lock all home directories when suspending 2020-01-28 22:36:56 +01:00
socket-proxy tree-wide: use the return value from sockaddr_un_set_path() 2020-03-02 15:55:44 +01:00
stdio-bridge
sulogin-shell tree-wide: normalize includes of public headers 2019-11-28 09:14:22 +01:00
sysctl sysctl: fix segfault 2020-02-06 23:49:32 +09:00
system-update-generator
systemctl systemctl: exit with 1 if no unit files found 2020-03-25 22:20:58 +02:00
systemd sd-bus: add va_list variants of variadic convenience functions 2020-04-02 10:26:18 +02:00
sysusers sysusers: do not require /proc to be mounted 2020-03-03 12:29:57 +01:00
sysv-generator
test string-util: make sure we eat even half complete words in split() 2020-04-02 16:43:36 +02:00
time-wait-sync
timedate shared: split out polkit stuff from bus-util.c → bus-polkit.c 2020-01-22 12:34:10 +01:00
timesync tree-wide: fix spelling of lookup and setup verbs 2020-03-03 15:02:53 +01:00
tmpfiles sd-path: rename the two functions 2020-03-27 20:12:44 +01:00
tty-ask-password-agent tree-wide: use the return value from sockaddr_un_set_path() 2020-03-02 15:55:44 +01:00
udev udev: Fix SIGSEGV in AlternativeNamesPolicy handling 2020-04-02 10:18:56 +02:00
update-done
update-utmp
user-sessions
userdb userwork: fix signal worker sends to manager requesting more workers 2020-03-30 16:05:27 +02:00
vconsole
veritysetup id128: introduce ID128_UUID_STRING_MAX for sizing UUID buffers 2019-12-10 11:56:18 +01:00
version meson: explain GIT_VERSION and PROJECT_VERSION 2020-02-28 16:54:33 +01:00
volatile-root