]> git.ipfire.org Git - thirdparty/systemd.git/commit
conf-files: rework conf_files_list_with_replacement()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 26 Jun 2025 18:45:56 +0000 (03:45 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 27 Jun 2025 19:13:43 +0000 (04:13 +0900)
commit41fb58595a22d50ca79278a64de4bff28f6dfd24
treeaccc08c6871cc042c39013bb4a59c374cd4b9866
parent49653adef3ff47c7bcd1098c763eb2a55297df15
conf-files: rework conf_files_list_with_replacement()

Previously, symlinks in the replacement was not chased, hence we may
inserted a path to outside of the root directory, or we may have wrong
judgement whether we should insert the replacement or not.

This makes the symlinks in the replacement also resolved.
Also, as the function is only used by tmpfiles and sysusers, this
enables CONF_FILES_REGULAR, CONF_FILES_CHASE_BASENAME, and
CONF_FILES_FILTER_MASKED_BY_SYMLINK flags.
src/basic/conf-files.c
src/basic/conf-files.h
src/test/test-conf-files.c