The Samba-Bugzilla – Attachment 1602 Details for
Bug 3293
Change smbclient to issue smbecho instead of checkpath
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch
echo.diff (text/plain), 1.78 KB, created by
Volker Lendecke
on 2005-11-30 04:42:54 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Volker Lendecke
Created:
2005-11-30 04:42:54 UTC
Size:
1.78 KB
patch
obsolete
>Index: libsmb/clientgen.c >=================================================================== >--- libsmb/clientgen.c (Revision 11970) >+++ libsmb/clientgen.c (Arbeitskopie) >@@ -495,3 +495,34 @@ > } > return True; > } >+ >+/**************************************************************************** >+ Send/receive a SMBecho command: ping the server >+****************************************************************************/ >+BOOL cli_echo(struct cli_state *cli, DATA_BLOB data) >+{ >+ char *p; >+ >+ SMB_ASSERT(data.length < 1024); >+ >+ memset(cli->outbuf,'\0',smb_size); >+ set_message(cli->outbuf,1,data.length,True); >+ SCVAL(cli->outbuf,smb_com,SMBecho); >+ SSVAL(cli->outbuf,smb_tid,65535); >+ SSVAL(cli->outbuf,smb_vwv0,1); >+ cli_setup_packet(cli); >+ p = smb_buf(cli->outbuf); >+ memcpy(p, data.data, data.length); >+ p += data.length; >+ >+ cli_setup_bcc(cli, p); >+ >+ cli_send_smb(cli); >+ if (!cli_receive_smb(cli)) { >+ return False; >+ } >+ >+ if (cli_is_error(cli)) return False; >+ >+ return True; >+} >Index: client/client.c >=================================================================== >--- client/client.c (Revision 11970) >+++ client/client.c (Arbeitskopie) >@@ -31,6 +31,7 @@ > extern BOOL override_logfile; > extern char tar_type; > extern BOOL in_client; >+extern int smb_read_error; > static int port = 0; > pstring cur_dir = "\\"; > static pstring cd_path = ""; >@@ -3087,8 +3088,17 @@ > receive_smb(cli->fd,cli->inbuf,0); > goto again; > } >- >- cli_chkpath(cli, "\\"); >+ >+ { >+ DATA_BLOB garbage = data_blob(NULL, 16); >+ if (garbage.data == NULL) { >+ DEBUG(0, ("malloc failed\n")); >+ return; >+ } >+ generate_random_buffer(garbage.data, garbage.length); >+ cli_echo(cli, garbage); >+ data_blob_free(&garbage); >+ } > } > > /****************************************************************************
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 3293
: 1602 |
1603