[SCM] Samba Shared Repository - branch v4-20-test updated
Jule Anger
janger at samba.org
Wed Aug 14 16:11:01 UTC 2024
The branch, v4-20-test has been updated
via ebca31b6971 s3:ntlm_auth: make logs more consistent with length check
from 32545902ed6 VERSION: Bump version up to Samba 4.20.5...
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-20-test
- Log -----------------------------------------------------------------
commit ebca31b6971f80f6a96016252bb82d15afbcd240
Author: Jones Syue <jonessyue at qnap.com>
Date: Fri Jul 5 17:36:46 2024 +0800
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 at qnap.com>
Reviewed-by: David Mulder <dmulder at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Sat Jul 6 00:52:02 UTC 2024 on atb-devel-224
(cherry picked from commit 90c9d0d98d3c80c77764dbcaf9c24d7c4ea31b4a)
Autobuild-User(v4-20-test): Jule Anger <janger at samba.org>
Autobuild-Date(v4-20-test): Wed Aug 14 16:10:42 UTC 2024 on atb-devel-224
-----------------------------------------------------------------------
Summary of changes:
source3/utils/ntlm_auth.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c
index 6660a31673a..bf411850455 100644
--- a/source3/utils/ntlm_auth.c
+++ b/source3/utils/ntlm_auth.c
@@ -2715,7 +2715,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);
@@ -2725,7 +2725,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);
@@ -2736,7 +2736,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);
--
Samba Shared Repository
More information about the samba-cvs
mailing list