The Samba-Bugzilla – Attachment 7085 Details for
Bug 5326
Print jobs fail above certain size (73-126kB)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patches for v3-5-test
tmp35.diff (text/plain), 3.11 KB, created by
Stefan Metzmacher
on 2011-11-11 01:17:01 UTC
(
hide
)
Description:
Patches for v3-5-test
Filename:
MIME Type:
Creator:
Stefan Metzmacher
Created:
2011-11-11 01:17:01 UTC
Size:
3.11 KB
patch
obsolete
>From 0bb66e70b3210f0036b03cbfe0880af261758079 Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Tue, 8 Nov 2011 08:25:16 +0100 >Subject: [PATCH 1/2] s3:libsmb: fix cli_write_and_x() against OS/2 print shares (bug #5326) > >Print shares doesn't support CAP_LARGE_WRITEX, while it's negotiated >by the file server part. > >metze > >Autobuild-User: Stefan Metzmacher <metze@samba.org> >Autobuild-Date: Tue Nov 8 17:01:36 CET 2011 on sn-devel-104 >(cherry picked from commit 95595dd93fd04999fcf56ecaab7c29b064d021f8) >--- > source3/libsmb/clireadwrite.c | 19 +++++++++++++++---- > 1 files changed, 15 insertions(+), 4 deletions(-) > >diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c >index 1f5f925..0481c18 100644 >--- a/source3/libsmb/clireadwrite.c >+++ b/source3/libsmb/clireadwrite.c >@@ -944,7 +944,7 @@ struct tevent_req *cli_write_andx_create(TALLOC_CTX *mem_ctx, > return NULL; > } > >- size = MIN(size, max_write); >+ state->size = MIN(size, max_write); > > vwv = state->vwv; > >@@ -956,8 +956,8 @@ struct tevent_req *cli_write_andx_create(TALLOC_CTX *mem_ctx, > SIVAL(vwv+5, 0, 0); > SSVAL(vwv+7, 0, mode); > SSVAL(vwv+8, 0, 0); >- SSVAL(vwv+9, 0, (size>>16)); >- SSVAL(vwv+10, 0, size); >+ SSVAL(vwv+9, 0, (state->size>>16)); >+ SSVAL(vwv+10, 0, state->size); > > SSVAL(vwv+11, 0, > cli_smb_wct_ofs(reqs_before, num_reqs_before) >@@ -1026,7 +1026,18 @@ static void cli_write_andx_done(struct tevent_req *subreq) > return; > } > state->written = SVAL(vwv+2, 0); >- state->written |= SVAL(vwv+4, 0)<<16; >+ if (state->size > UINT16_MAX) { >+ /* >+ * It is important that we only set the >+ * high bits only if we asked for a large write. >+ * >+ * OS/2 print shares get this wrong and may send >+ * invalid values. >+ * >+ * See bug #5326. >+ */ >+ state->written |= SVAL(vwv+4, 0)<<16; >+ } > tevent_req_done(req); > } > >-- >1.7.4.1 > > >From 09b5ad860c117da6bae206b0cbbbba728d0dcbc9 Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Fri, 11 Nov 2011 02:10:00 +0100 >Subject: [PATCH 2/2] s3:libsmb: consistently use state->size in cli_write_andx_create() (bug #5326) > >Otherwise we may get unexpected results. > >This is a fix that was missing in commit 95595dd93fd04999fcf56ecaab7c29b064d021f8 >(s3:libsmb: fix cli_write_and_x() against OS/2 print shares (bug #5326)) > >metze > >Autobuild-User: Stefan Metzmacher <metze@samba.org> >Autobuild-Date: Wed Nov 9 10:13:32 CET 2011 on sn-devel-104 >(cherry picked from commit 4b31c4273c45faa639445614061f3da548eb8505) >--- > source3/libsmb/clireadwrite.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > >diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c >index 0481c18..53ecacc 100644 >--- a/source3/libsmb/clireadwrite.c >+++ b/source3/libsmb/clireadwrite.c >@@ -974,7 +974,7 @@ struct tevent_req *cli_write_andx_create(TALLOC_CTX *mem_ctx, > state->iov[0].iov_base = (void *)&state->pad; > state->iov[0].iov_len = 1; > state->iov[1].iov_base = CONST_DISCARD(void *, buf); >- state->iov[1].iov_len = size; >+ state->iov[1].iov_len = state->size; > > subreq = cli_smb_req_create(state, ev, cli, SMBwriteX, 0, wct, vwv, > 2, state->iov); >-- >1.7.4.1 >
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:
kukks
:
review+
Actions:
View
Attachments on
bug 5326
:
3220
|
7084
| 7085