1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 17:51:22 +03:00

tmpfiles: check if not too many symbolic links. (#7423)

Some filesystems do not set d_type value when
readdir is called, so entry type is unknown.
Therefore check if accessing entry does not
return ELOOP error.
This commit is contained in:
Lukasz Rubaszewski 2017-11-24 22:28:14 +01:00 committed by Lennart Poettering
parent 1ff654e28b
commit 3d22bc8636

View File

@ -1095,7 +1095,7 @@ static int item_do_children(Item *i, const char *path, action_t action) {
d = opendir_nomod(path);
if (!d)
return IN_SET(errno, ENOENT, ENOTDIR) ? 0 : -errno;
return IN_SET(errno, ENOENT, ENOTDIR, ELOOP) ? 0 : -errno;
FOREACH_DIRENT_ALL(de, d, r = -errno) {
_cleanup_free_ char *p = NULL;