The Samba-Bugzilla – Attachment 12071 Details for
Bug 11276
All errors become EINVAL when using SMB2/3
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-Correctly-set-cli-raw_status-for-libsmbclient-in-SMB.patch (text/plain), 3.44 KB, created by
Jeremy Allison
on 2016-05-05 00:29:45 UTC
(
hide
)
Description:
git-am fix for 4.4.next, 4.3.next.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2016-05-05 00:29:45 UTC
Size:
3.44 KB
patch
obsolete
>From 35fa6640dfb04972df7e5d910be4d3605a7771b9 Mon Sep 17 00:00:00 2001 >From: Robin McCorkell <robin@mccorkell.me.uk> >Date: Mon, 2 May 2016 21:48:14 +0100 >Subject: [PATCH] Correctly set cli->raw_status for libsmbclient in SMB2 code > >The SMB2 file handling code wasn't correctly setting raw_status, which >is used by libsmbclient to report file open errors etc. > >https://bugzilla.samba.org/show_bug.cgi?id=11276 > >Signed-off-by: Robin McCorkell <robin@mccorkell.me.uk> >Reviewed-by: Jeremy Allison <jra@samba.org> >Reviewed-by: Andreas Schneider <asn@samba.org> >(cherry picked from commit 2a872e2b66f373b3c96b315b13c9f06a15522e13) >--- > source3/libsmb/cli_smb2_fnum.c | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) > >diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c >index c9f4060..a17d918 100644 >--- a/source3/libsmb/cli_smb2_fnum.c >+++ b/source3/libsmb/cli_smb2_fnum.c >@@ -262,6 +262,7 @@ NTSTATUS cli_smb2_create_fnum_recv(struct tevent_req *req, uint16_t *pfnum, > NTSTATUS status; > > if (tevent_req_is_nterror(req, &status)) { >+ state->cli->raw_status = status; > return status; > } > if (pfnum != NULL) { >@@ -270,6 +271,7 @@ NTSTATUS cli_smb2_create_fnum_recv(struct tevent_req *req, uint16_t *pfnum, > if (cr != NULL) { > *cr = state->cr; > } >+ state->cli->raw_status = NT_STATUS_OK; > return NT_STATUS_OK; > } > >@@ -390,7 +392,11 @@ static void cli_smb2_close_fnum_done(struct tevent_req *subreq) > > NTSTATUS cli_smb2_close_fnum_recv(struct tevent_req *req) > { >- return tevent_req_simple_recv_ntstatus(req); >+ struct cli_smb2_close_fnum_state *state = tevent_req_data( >+ req, struct cli_smb2_close_fnum_state); >+ NTSTATUS status = tevent_req_simple_recv_ntstatus(req); >+ state->cli->raw_status = status; >+ return status; > } > > NTSTATUS cli_smb2_close_fnum(struct cli_state *cli, uint16_t fnum) >@@ -2302,6 +2308,7 @@ NTSTATUS cli_smb2_read_recv(struct tevent_req *req, > req, struct cli_smb2_read_state); > > if (tevent_req_is_nterror(req, &status)) { >+ state->cli->raw_status = status; > return status; > } > /* >@@ -2311,6 +2318,7 @@ NTSTATUS cli_smb2_read_recv(struct tevent_req *req, > */ > *received = (ssize_t)state->received; > *rcvbuf = state->buf; >+ state->cli->raw_status = NT_STATUS_OK; > return NT_STATUS_OK; > } > >@@ -2409,6 +2417,7 @@ NTSTATUS cli_smb2_write_recv(struct tevent_req *req, > NTSTATUS status; > > if (tevent_req_is_nterror(req, &status)) { >+ state->cli->raw_status = status; > tevent_req_received(req); > return status; > } >@@ -2416,6 +2425,7 @@ NTSTATUS cli_smb2_write_recv(struct tevent_req *req, > if (pwritten != NULL) { > *pwritten = (size_t)state->written; > } >+ state->cli->raw_status = NT_STATUS_OK; > tevent_req_received(req); > return NT_STATUS_OK; > } >@@ -2573,11 +2583,13 @@ NTSTATUS cli_smb2_writeall_recv(struct tevent_req *req, > NTSTATUS status; > > if (tevent_req_is_nterror(req, &status)) { >+ state->cli->raw_status = status; > return status; > } > if (pwritten != NULL) { > *pwritten = (size_t)state->written; > } >+ state->cli->raw_status = NT_STATUS_OK; > return NT_STATUS_OK; > } > >@@ -2838,12 +2850,14 @@ NTSTATUS cli_smb2_splice_recv(struct tevent_req *req, off_t *written) > NTSTATUS status; > > if (tevent_req_is_nterror(req, &status)) { >+ state->cli->raw_status = status; > tevent_req_received(req); > return status; > } > if (written != NULL) { > *written = state->written; > } >+ state->cli->raw_status = NT_STATUS_OK; > tevent_req_received(req); > return NT_STATUS_OK; > } >-- >2.8.0.rc3.226.g39d4020 >
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:
slow
:
review+
Actions:
View
Attachments on
bug 11276
: 12071