Handle d_type == DT_UNKNOWN correctly
authorMichael Olbrich <m.olbrich@pengutronix.de>
Sun, 29 Sep 2019 11:43:00 +0000 (13:43 +0200)
committerMichael Biebl <biebl@debian.org>
Fri, 15 Nov 2019 21:01:17 +0000 (21:01 +0000)
commit046eb50b3472e44cbf17bb8bddb87ddcbdc81c3a
tree1547cc5b779ee15ca788fd912561a2b62ffbe1f3
parent3c7a1d75d4e4f5f0e7f76d4b60da76308323e668
Handle d_type == DT_UNKNOWN correctly

As documented in the man-page, readdir() may return a directory entry with
d_type == DT_UNKNOWN. This must be handled for regular filesystems.

dirent_ensure_type() is available to set d_type if necessary. Use it in
some more places.

Without this systemd will fail to boot correctly with nfsroot and some
other filesystems.

Closes #13609

(cherry picked from commit 28e68bb23547cbc11cd3f62a1a38dbe2b387b370)
(cherry picked from commit 5c0224c7bf3c4b0f18d44ee9da7e058833b1d8e2)

Gbp-Pq: Name Handle-d_type-DT_UNKNOWN-correctly.patch
src/core/smack-setup.c
src/login/logind-dbus.c
src/login/logind.c
src/shared/bootspec.c
src/shared/unit-file.c