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>
Sun, 10 Nov 2019 23:58:41 +0000 (23:58 +0000)
commitdbf2229e644e1b5c0557ec5393cd76efc29c1b49
tree378de90cba3b3c9facee2c68389b6351bf6d6ac3
parent9094052d5629a4f7fabd57b13b79b4d3bb63ae6f
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