2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-30 22:05:46 +00:00

Use correct error message when the TLS connection is dropped.

Was: "recv: Unknown error 0", now: "lost connection to log server".
This commit is contained in:
Todd C. Miller
2020-12-03 11:42:20 -07:00
parent d98374753c
commit a19f242796

View File

@@ -1721,7 +1721,10 @@ server_msg_cb(int fd, int what, void *v)
sudo_warnx("%s", errstr);
goto bad;
case SSL_ERROR_SYSCALL:
sudo_warn("recv");
if (nread == 0)
sudo_warnx("%s", U_("lost connection to log server"));
else
sudo_warn("recv");
goto bad;
default:
errstr = ERR_reason_error_string(ERR_get_error());