tmpfiles: stay on one file system when cleaning

Cleaning the directory of an entry with an age went into whatever was
mounted below it:

    d /srv - - - 10d

    tmpfiles --clean t.conf

With a disk mounted on /srv/data this removed every file on it older
than ten days.

Give nftw() FTW_MOUNT, so it stays on the file system of the directory.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-11-20 18:02:35 +01:00
1 parent 3c9500fc08
commit 9392f2082e
4 files changed
+47 -1

No files matched your search

+2
View File
@@ -259,6 +259,8 @@ All relevant changes are documented in this file.
- Fix tmpfiles giving up at the first entry it does not support, an unknown
type or a `%` specifier in the path. No entry after it was run, in that
file or in the files after it. Such an entry is now skipped with a warning
- Fix `tmpfiles --clean` cleaning other file systems mounted below the
directory of an entry, it now stays on the file system of the directory
- Fix a lost reload for a service paused mid-reload by a condition in
flux. A second reload arriving meanwhile re-parsed the unchanged .conf
and cleared the pending mark, so the service resumed without ever being