From: Pavel Raiskup Date: Tue, 31 Jul 2018 09:13:48 +0000 (+0300) Subject: Report race on systems without O_DIRECTORY X-Git-Tag: release_1_31~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c1b569d9d61f129d2eefd1e87e6ea6cd96810788;p=thirdparty%2Ftar.git Report race on systems without O_DIRECTORY * src/names.c (collect_and_sort_names): Report ENOTDIR after successful fstat() but !S_ISDIR. --- diff --git a/src/names.c b/src/names.c index f6ad9fe0..f4dc978c 100644 --- a/src/names.c +++ b/src/names.c @@ -1767,6 +1767,11 @@ collect_and_sort_names (void) name->found_count++; add_hierarchy_to_namelist (&st, name); } + else + { + errno = ENOTDIR; + open_diag (name->name); + } } }