mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-27 08:00:11 +00:00
cat: fallback on EISDIR with copy_file_range(2)
The filesystem may support reading directories directly when security.bsd.allow_read_dir is set. MFC after: 1 week PR: 275099
This commit is contained in:
parent
6000d46fc3
commit
3c773cad57
@ -281,7 +281,8 @@ scanfiles(char *argv[], int cooked __unused)
|
||||
} else {
|
||||
#ifndef BOOTSTRAP_CAT
|
||||
if (in_kernel_copy(fd) == -1) {
|
||||
if (errno == EINVAL || errno == EBADF)
|
||||
if (errno == EINVAL || errno == EBADF ||
|
||||
errno == EISDIR)
|
||||
raw_cat(fd);
|
||||
else
|
||||
err(1, "stdout");
|
||||
|
Loading…
Reference in New Issue
Block a user