The Samba-Bugzilla – Attachment 13779 Details for
Bug 13007
smbclient should not terminate the connection if a ECHO request gets an error returned from the server
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.7.next, 4.6.next.
0001-libsmbclient-Allow-server-NetApp-to-return-STATUS_IN.patch (text/plain), 2.16 KB, created by
Jeremy Allison
on 2017-11-14 21:00:54 UTC
(
hide
)
Description:
git-am fix for 4.7.next, 4.6.next.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2017-11-14 21:00:54 UTC
Size:
2.16 KB
patch
obsolete
>From 79381295b788a8196ccbf2ff378268286d7782d5 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Fri, 8 Sep 2017 16:20:34 -0700 >Subject: [PATCH] libsmbclient: Allow server (NetApp) to return > STATUS_INVALID_PARAMETER from an echo. > >It does this if we send a session ID of zero. The server still replied. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=13007 > >Signed-off-by: Jeremy Allison <jra@samba.org> >Reviewed-by: Andreas Schneider <asn@samba.org> > >Autobuild-User(master): Jeremy Allison <jra@samba.org> >Autobuild-Date(master): Sat Nov 11 08:44:37 CET 2017 on sn-devel-144 > >(cherry picked from commit a0f6ea8dec1ab3d19bc93da12a9b0a1c0ccf6142) >--- > source3/client/client.c | 8 +++++++- > source3/libsmb/libsmb_server.c | 11 ++++++++++- > 2 files changed, 17 insertions(+), 2 deletions(-) > >diff --git a/source3/client/client.c b/source3/client/client.c >index b4a6c7d0389..9c57375881d 100644 >--- a/source3/client/client.c >+++ b/source3/client/client.c >@@ -5900,7 +5900,13 @@ static void readline_callback(void) > /* Ping the server to keep the connection alive using SMBecho. */ > memset(garbage, 0xf0, sizeof(garbage)); > status = cli_echo(cli, 1, data_blob_const(garbage, sizeof(garbage))); >- if (NT_STATUS_IS_OK(status)) { >+ if (NT_STATUS_IS_OK(status) || >+ NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER)) { >+ /* >+ * Even if server returns NT_STATUS_INVALID_PARAMETER >+ * it still responded. >+ * BUG: https://bugzilla.samba.org/show_bug.cgi?id=13007 >+ */ > return; > } > >diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c >index b0e5926fa65..2d41f2facf3 100644 >--- a/source3/libsmb/libsmb_server.c >+++ b/source3/libsmb/libsmb_server.c >@@ -61,7 +61,16 @@ SMBC_check_server(SMBCCTX * context, > 1, > data_blob_const(data, sizeof(data))); > if (!NT_STATUS_IS_OK(status)) { >- return 1; >+ /* >+ * Some NetApp servers return >+ * NT_STATUS_INVALID_PARAMETER.That's OK, they still >+ * replied. >+ * BUG: https://bugzilla.samba.org/show_bug.cgi?id=13007 >+ */ >+ if (!NT_STATUS_EQUAL(status, >+ NT_STATUS_INVALID_PARAMETER)) { >+ return 1; >+ } > } > server->last_echo_time = now; > } >-- >2.15.0.448.gf294e3d99a-goog >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
asn
:
review+
Actions:
View
Attachments on
bug 13007
:
13561
|
13562
| 13779