The Samba-Bugzilla – Attachment 12199 Details for
Bug 11986
smbclient sends an invalid filename when getting the disk free value against SMB2 server.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.4.next, 4.3.next.
0001-s3-libsmb-Correctly-trim-a-trailing-character-in-cli.patch (text/plain), 1.75 KB, created by
Jeremy Allison
on 2016-06-22 16:47:55 UTC
(
hide
)
Description:
git-am fix for 4.4.next, 4.3.next.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2016-06-22 16:47:55 UTC
Size:
1.75 KB
patch
obsolete
>From facf3595b143668e0268e775742ae3bb5fbbb209 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Tue, 21 Jun 2016 15:49:27 -0700 >Subject: [PATCH] s3: libsmb: Correctly trim a trailing \\ character in > cli_smb2_create_fnum_send() when passing a pathname to SMB2 create. > >We already trim any leading \\ characters in this function, so this is the simplest place >to clean the pathname. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=11986 > >Signed-off-by: Jeremy Allison <jra@samba.org> >Reviewed-by: Uri Simchoni <uri@samba.org> > >Autobuild-User(master): Uri Simchoni <uri@samba.org> >Autobuild-Date(master): Wed Jun 22 10:33:29 CEST 2016 on sn-devel-144 > >(cherry picked from commit c0704d99ce43a5497a29bfc53331159e4f978441) >--- > source3/libsmb/cli_smb2_fnum.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > >diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c >index a17d918..c5b1434 100644 >--- a/source3/libsmb/cli_smb2_fnum.c >+++ b/source3/libsmb/cli_smb2_fnum.c >@@ -176,6 +176,7 @@ struct tevent_req *cli_smb2_create_fnum_send(TALLOC_CTX *mem_ctx, > { > struct tevent_req *req, *subreq; > struct cli_smb2_create_fnum_state *state; >+ size_t fname_len = 0; > > req = tevent_req_create(mem_ctx, &state, > struct cli_smb2_create_fnum_state); >@@ -199,6 +200,17 @@ struct tevent_req *cli_smb2_create_fnum_send(TALLOC_CTX *mem_ctx, > fname++; > } > >+ /* Or end in a '\' */ >+ fname_len = strlen(fname); >+ if (fname_len > 0 && fname[fname_len-1] == '\\') { >+ char *new_fname = talloc_strdup(state, fname); >+ if (tevent_req_nomem(new_fname, req)) { >+ return tevent_req_post(req, ev); >+ } >+ new_fname[fname_len-1] = '\0'; >+ fname = new_fname; >+ } >+ > subreq = smb2cli_create_send(state, ev, > cli->conn, > cli->timeout, >-- >2.7.4 >
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:
uri
:
review+
Actions:
View
Attachments on
bug 11986
:
12194
| 12199