The Samba-Bugzilla – Attachment 10676 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-Checking-server-alive-status-while-reusing-the-cache.patch (text/plain), 1.11 KB, created by
hargagan
on 2015-01-28 13:07:13 UTC
(
hide
)
Description:
Checking the connection alive status before reusing the cached connection handle
Filename:
MIME Type:
Creator:
hargagan
Created:
2015-01-28 13:07:13 UTC
Size:
1.11 KB
patch
obsolete
>From fac563ea2a8919ca4b10927e0fa4acb9c74172bb Mon Sep 17 00:00:00 2001 >From: Har Gagan Sahai <SHarGagan@novell.com> >Date: Wed, 28 Jan 2015 18:10:37 +0530 >Subject: [PATCH] Checking server alive status while reusing the cached > connection by sending SMB Echo request. > >Signed-off-by: Har Gagan Sahai <SHarGagan@novell.com> >--- > source3/libsmb/libsmb_server.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > >diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c >index 8f68a40..bd69563 100644 >--- a/source3/libsmb/libsmb_server.c >+++ b/source3/libsmb/libsmb_server.c >@@ -49,6 +49,18 @@ SMBC_check_server(SMBCCTX * context, > return 1; > } > >+ if (smbXcli_conn_protocol(server->cli->conn) >= PROTOCOL_SMB2_02) { >+ status = smb2cli_echo(server->cli->conn, 0); >+ } else { >+ unsigned char garbage[16]; >+ memset(garbage, 0xf0, sizeof(garbage)); >+ status = cli_echo(server->cli, 1, data_blob_const(garbage, sizeof(garbage))); >+ } >+ >+ 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