diff options
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/ntlm_auth.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c index 0e763968ab..70383b31dc 100644 --- a/source3/utils/ntlm_auth.c +++ b/source3/utils/ntlm_auth.c @@ -1418,7 +1418,7 @@ static void manage_ntlm_server_1_request(enum stdio_helper_mode stdio_helper_mod } else { x_fprintf(x_stdout, "Authenticated: No\n"); } - } else if (!lm_response.data || !nt_response.data) { + } else if (!lm_response.data && !nt_response.data) { x_fprintf(x_stdout, "Error: No password supplied!\n"); } else if (!challenge.data) { x_fprintf(x_stdout, "Error: No lanman-challenge supplied!\n"); @@ -1513,30 +1513,31 @@ static void manage_ntlm_server_1_request(enum stdio_helper_mode stdio_helper_mod request = buf; - parameter = strstr_m(request, ": "); + /* Indicates a base64 encoded structure */ + parameter = strstr_m(request, ":: "); if (!parameter) { - /* Indicates a base64 encoded structure */ - parameter = strstr_m(request, ":: "); + parameter = strstr_m(request, ": "); if (!parameter) { DEBUG(0, ("Parameter not found!\n")); x_fprintf(x_stdout, "Error: Parameter not found!\n.\n"); return; } - parameter[0] ='\0'; - parameter++; + parameter[0] ='\0'; parameter++; parameter[0] ='\0'; parameter++; - base64_decode_inplace(parameter); } else { - parameter[0] ='\0'; parameter++; parameter[0] ='\0'; parameter++; + parameter[0] ='\0'; + parameter++; + + base64_decode_inplace(parameter); } if (strequal(request, "LANMAN-Challenge")) { |