The Samba-Bugzilla – Attachment 13362 Details for
Bug 12896
torture/ntlm_auth: do not assume a line is less than 2047 bytes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch cherry-picked from master for 4.6 (only)
0001-torture-ntlm_auth-do-not-assume-a-line-is-less-than-.patch (text/plain), 1.58 KB, created by
Andrew Bartlett
on 2017-07-12 03:49:50 UTC
(
hide
)
Description:
patch cherry-picked from master for 4.6 (only)
Filename:
MIME Type:
Creator:
Andrew Bartlett
Created:
2017-07-12 03:49:50 UTC
Size:
1.58 KB
patch
obsolete
>From 0060cf2f464d989cd88b10627f035f97d3b6f3ae Mon Sep 17 00:00:00 2001 >From: Bob Campbell <bobcampbell@catalyst.net.nz> >Date: Wed, 18 Jan 2017 15:55:49 +1300 >Subject: [PATCH] torture/ntlm_auth: do not assume a line is less than 2047 > bytes > >These tests would fail when ran in our cloud. This was due to lines that >were more than 2047 bytes in length, causing us to fail readLine with a >ReadChildError. This fix lets it read lines of any length, but in 2047 >byte segments. > >Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> >Reviewed-by: Garming Sam <garming@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12896 >(cherry picked from commit 88e4b71e7856f5f1dc4cebd6d4408c9fd4499178) >--- > source3/torture/test_ntlm_auth.py | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > >diff --git a/source3/torture/test_ntlm_auth.py b/source3/torture/test_ntlm_auth.py >index fffeb2696b2..076019c539b 100755 >--- a/source3/torture/test_ntlm_auth.py >+++ b/source3/torture/test_ntlm_auth.py >@@ -37,10 +37,15 @@ def readLine(pipe): > Read a line from the child's pipe, returns the string read. > Throws ReadChildError if the read fails. > """ >- buf = os.read(pipe, 2047) >- newline = buf.find('\n') >- if newline == -1: >- raise ReadChildError() >+ newline = -1 >+ buf = "" >+ while newline == -1: >+ more = os.read(pipe, 2047) >+ buf = buf + more >+ newline = buf.find('\n') >+ if more == "": >+ raise ReadChildError() >+ > return buf[:newline] > > def writeLine(pipe, buf): >-- >2.11.0 >
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:
abartlet
:
review?
(
garming
)
abartlet
:
review?
(
metze
)
Actions:
View
Attachments on
bug 12896
: 13362