From 05abc58fae01e5bd60c4072740ef82ff59a0c9fc Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 2 May 2018 11:19:31 -0700 Subject: [PATCH] s3: libsmbclient: 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 --- source3/libsmb/libsmb_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.17.0.441.gb46fe60e1d-goog