1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-21 02:50:18 +03:00

fileio: propagate original error if we notice AF_UNIX connect() is not going to work

let's not make up new errors in these checks that validate if connect()
work at all. After all, we don't really know if the ENXIO we saw earlier
actually is really caused by the inode being an AF_UNIX socket, we just
have the suspicion...
This commit is contained in:
Lennart Poettering 2022-05-10 16:22:16 +02:00 committed by Yu Watanabe
parent dfa2b389a6
commit 28fe6a8072

View File

@ -776,7 +776,7 @@ int read_full_file_full(
/* Seeking is not supported on AF_UNIX sockets */
if (offset != UINT64_MAX)
return -ESPIPE;
return -ENXIO;
if (dir_fd == AT_FDCWD)
r = sockaddr_un_set_path(&sa.un, filename);