The Samba-Bugzilla – Attachment 10690 Details for
Bug 11079
libsmbclient not checking the cached connection alive status before re-using it from connection cache
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Checking the connection alive status before reusing the cached connection handle
0001-Sending-SMB-Echo-or-KeepAlive-request-on-the-cached-.patch (text/plain), 1.13 KB, created by
hargagan
on 2015-01-29 08:44:17 UTC
(
hide
)
Description:
Checking the connection alive status before reusing the cached connection handle
Filename:
MIME Type:
Creator:
hargagan
Created:
2015-01-29 08:44:17 UTC
Size:
1.13 KB
patch
obsolete
>From 4b54bfb9f86e34c53e4a1ed79b8d285f7a57e868 Mon Sep 17 00:00:00 2001 >From: Har Gagan Sahai <SHarGagan@novell.com> >Date: Thu, 29 Jan 2015 09:57:55 +0530 >Subject: [PATCH] Sending SMB Echo or KeepAlive request on the cached > connection before reusing it libsmbclient. > >Signed-off-by: Har Gagan Sahai <SHarGagan@novell.com> >--- > source3/libsmb/libsmb_server.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > >diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c >index 8f68a40..118770b 100644 >--- a/source3/libsmb/libsmb_server.c >+++ b/source3/libsmb/libsmb_server.c >@@ -45,10 +45,24 @@ int > SMBC_check_server(SMBCCTX * context, > SMBCSRV * server) > { >+ NT_STATUS status = NT_STATUS_OK; >+ > if (!cli_state_is_connected(server->cli)) { > return 1; > } > >+ if (smbXcli_conn_protocol(server->cli->conn) >= PROTOCOL_SMB2_02) { >+ status = smb2cli_echo(server->cli->conn, 0); >+ } else { >+ unsigned char data[16] = {0}; >+ memset(data, 0xf0, sizeof(data)); >+ status = cli_echo(server->cli, 1, data_blob_const(data, sizeof(data))); >+ } >+ >+ if (!NT_STATUS_IS_OK(status)) { >+ return 1; >+ } >+ > return 0; > } > >-- >1.8.4.5 >
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
Actions:
View
Attachments on
bug 11079
:
10676
|
10690
|
10884
|
10886
|
10888
|
10889
|
10898