basic/unit-file: don't filter out names starting with dot

Fixes #20859
Reverts 3796bdc55d
This commit is contained in:
Anita Zhang 2021-09-28 23:52:39 -07:00 committed by Lennart Poettering
parent e30a3ba16a
commit 14bb729534
2 changed files with 7 additions and 1 deletions

View file

@ -284,7 +284,7 @@ int unit_file_build_name_map(
continue;
}
FOREACH_DIRENT(de, d, log_warning_errno(errno, "Failed to read \"%s\", ignoring: %m", *dir)) {
FOREACH_DIRENT_ALL(de, d, log_warning_errno(errno, "Failed to read \"%s\", ignoring: %m", *dir)) {
char *filename;
_unused_ _cleanup_free_ char *_filename_free = NULL;
_cleanup_free_ char *simplified = NULL;

View file

@ -68,6 +68,12 @@ cat <<EOF >/tmp/testfile.service
ExecStart = echo hello
EOF
# Prevent regression from #13380 and #20859 where we can't verify hidden files
cp /tmp/testfile.service /tmp/.testfile.service
systemd-analyze verify /tmp/.testfile.service
rm /tmp/.testfile.service
# Zero exit status since the value used for comparison determine exposure to security threats is by default 100
systemd-analyze security --offline=true /tmp/testfile.service