The Samba-Bugzilla – Attachment 18366 Details for
Bug 15677
ntlm_auth make logs more consistent with length check
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for v4-19-test
bfixes-v4-19-test.patch (text/plain), 2.95 KB, created by
Jones Syue (dead mail address)
on 2024-07-06 02:50:37 UTC
(
hide
)
Description:
Patch for v4-19-test
Filename:
MIME Type:
Creator:
Jones Syue (dead mail address)
Created:
2024-07-06 02:50:37 UTC
Size:
2.95 KB
patch
obsolete
>From 8822f8b6612d3a627002c7c29b7b7a353273a6f4 Mon Sep 17 00:00:00 2001 >From: Jones Syue <jonessyue@qnap.com> >Date: Fri, 5 Jul 2024 17:36:46 +0800 >Subject: [PATCH] s3:ntlm_auth: make logs more consistent with length check > >Run ntlm_auth with options --lm-response/--nt-response/--challenge, and pass >wrong length to these options, got error prompted logs about 'only got xxx >bytes', which are not consistent with length check. This patch revise logs >for length check to make it more consistent. > >For example --lm-response requires exact 24 hex, let us input three kinds >of length 23 24 25, prompted logs said 'only got 25 bytes' seems confusing. > >script: >for length in 23 24 25; \ >do \ > ntlm_auth --username=${un} --password=${pw} \ > --lm-response="`openssl rand -hex ${length}`"; \ >done; > >output: >hex decode of 04db772593f5e6023d0ab4bc67a942c9179963477eb49d failed! (only got 23 bytes) >NT_STATUS_OK: The operation completed successfully. (0x0) >hex decode of 1e57749feb46bedcf969af6cbbe10e21d0232e35c27eb07294 failed! (only got 25 bytes) > >After patch it shows 'got 25 bytes, expected 24' seems more consistent: > >hex decode of e13e70c9cf2ac1e20015657c4bec53435b1b948febb63f failed! (got 23 bytes, expected 24) >NT_STATUS_OK: The operation completed successfully. (0x0) >hex decode of 64647005243092b036856f572faad262e0b69386d095d60f54 failed! (got 25 bytes, expected 24) > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=15677 > >Signed-off-by: Jones Syue <jonessyue@qnap.com> >Reviewed-by: David Mulder <dmulder@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> > >Autobuild-User(master): Jeremy Allison <jra@samba.org> >Autobuild-Date(master): Sat Jul 6 00:52:02 UTC 2024 on atb-devel-224 > >(cherry picked from commit 90c9d0d98d3c80c77764dbcaf9c24d7c4ea31b4a) >--- > source3/utils/ntlm_auth.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c >index cff3c53845ff..74aa610f4865 100644 >--- a/source3/utils/ntlm_auth.c >+++ b/source3/utils/ntlm_auth.c >@@ -2701,7 +2701,7 @@ enum { > opt_challenge = strhex_to_data_blob(NULL, hex_challenge); > if (opt_challenge.length != 8) { > fprintf(stderr, "hex decode of %s failed! " >- "(only got %d bytes)\n", >+ "(got %d bytes, expected 8)\n", > hex_challenge, > (int)opt_challenge.length); > exit(1); >@@ -2711,7 +2711,7 @@ enum { > opt_lm_response = strhex_to_data_blob(NULL, hex_lm_response); > if (opt_lm_response.length != 24) { > fprintf(stderr, "hex decode of %s failed! " >- "(only got %d bytes)\n", >+ "(got %d bytes, expected 24)\n", > hex_lm_response, > (int)opt_lm_response.length); > exit(1); >@@ -2722,7 +2722,7 @@ enum { > opt_nt_response = strhex_to_data_blob(NULL, hex_nt_response); > if (opt_nt_response.length < 24) { > fprintf(stderr, "hex decode of %s failed! " >- "(only got %d bytes)\n", >+ "(only got %d bytes, needed at least 24)\n", > hex_nt_response, > (int)opt_nt_response.length); > exit(1); >-- >2.1.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:
jra
:
review+
dbagnall
:
review+
Actions:
View
Attachments on
bug 15677
:
18365
| 18366