1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

s3: libsmbclient: Fix hard-coded connection error return of ETIMEDOUT.

We shouldn't hard-code the connection error as ETIMEDOUT when
we have a perfectly good NT_STATUS to map from.

Found by the ChromeOS guys trying to connect an SMB2-only client
to an SMB1-only supporting server.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13419

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May  3 02:42:20 CEST 2018 on sn-devel-144
This commit is contained in:
Jeremy Allison 2018-05-02 11:19:31 -07:00
parent 0c78aa1f3a
commit 795ec751ac

View File

@ -500,7 +500,7 @@ SMBC_server_internal(TALLOC_CTX *ctx,
lp_client_max_protocol());
if (!NT_STATUS_IS_OK(status)) {
cli_shutdown(c);
errno = ETIMEDOUT;
errno = map_errno_from_nt_status(status);
return NULL;
}