]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: watch paths with symlinks in .path units 19726/head
authorLennart Poettering <lennart@poettering.net>
Tue, 25 May 2021 21:10:36 +0000 (23:10 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 25 May 2021 21:14:38 +0000 (23:14 +0200)
commit41cdcb54980f95326d7ed0361f16786b76c2787e
tree4c0401dd6e2634e65c87b332f78dfc8409f5aaee
parentd6d00b650f47f6db5f29eb273eaaef7ed71f61f1
core: watch paths with symlinks in .path units

When watching paths that contain symlinks in some element we so far
always only watched the inode they are pointing to, not the symlink
inode itself. Let's fix that and always watch both. We do this by simply
installing the inotify watch once with and once without IN_DONT_FOLLOW.
For non-symlink inodes this just overrides the same watch twice (where
the second one replaces the first), which is has no effect effectively.
For symlinks it means we'll watch both source and destination.

Fixes: #17727
src/core/path.c