summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2018-05-02 11:19:31 -0700
committerKarolin Seeger <kseeger@samba.org>2018-05-07 14:25:28 +0200
commit02b898e44d3b71670473cd7698b27d7448d0a96e (patch)
treeb34ef86fcc8eaf01f9917e5529fbd3c679ddbf81 /source3
parentdc7b7beeee61beab3d23a7678090208f7d345901 (diff)
downloadsamba-02b898e44d3b71670473cd7698b27d7448d0a96e.tar.gz
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 (cherry picked from commit 795ec751ac5f6e58966385bec25063c4af4f185d) Autobuild-User(v4-8-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-8-test): Mon May 7 14:25:28 CEST 2018 on sn-devel-144
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/libsmb_server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c
index e6067be2013..67dfcf72327 100644
--- a/source3/libsmb/libsmb_server.c
+++ b/source3/libsmb/libsmb_server.c
@@ -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;
}