diff options
author | Lukasz Rubaszewski <l_rubaszewski@o2.pl> | 2017-11-24 22:28:14 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-11-24 22:28:14 +0100 |
commit | 3d22bc8636b05524a12255781bed6ef5c6afac9d (patch) | |
tree | 0cd158cd664b408dfd1727d6af93c9378cdc59af /src/tmpfiles | |
parent | 1ff654e28b7b8e7d0a0be33522a84069ac6b07c0 (diff) | |
download | systemd-3d22bc8636b05524a12255781bed6ef5c6afac9d.tar.gz |
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.
Diffstat (limited to 'src/tmpfiles')
-rw-r--r-- | src/tmpfiles/tmpfiles.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 1af4b6d4cb..970ea3b05f 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -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; |