mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
auth:creds: Use gnutls_error_to_ntstatus() in credentials_ntlm
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
aaf41bf96f
commit
b21af2f173
@ -28,6 +28,7 @@
|
|||||||
#include "auth/credentials/credentials.h"
|
#include "auth/credentials/credentials.h"
|
||||||
#include "auth/credentials/credentials_internal.h"
|
#include "auth/credentials/credentials_internal.h"
|
||||||
|
|
||||||
|
#include "libcli/util/gnutls_error.h"
|
||||||
#include <gnutls/gnutls.h>
|
#include <gnutls/gnutls.h>
|
||||||
#include <gnutls/crypto.h>
|
#include <gnutls/crypto.h>
|
||||||
|
|
||||||
@ -175,10 +176,7 @@ _PUBLIC_ NTSTATUS cli_credentials_get_ntlm_response(struct cli_credentials *cred
|
|||||||
sizeof(session_nonce),
|
sizeof(session_nonce),
|
||||||
session_nonce_hash);
|
session_nonce_hash);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
if (rc == GNUTLS_E_UNWANTED_ALGORITHM) {
|
return gnutls_error_to_ntstatus(rc, NT_STATUS_NTLM_BLOCKED);
|
||||||
return NT_STATUS_NTLM_BLOCKED;
|
|
||||||
}
|
|
||||||
return NT_STATUS_INTERNAL_ERROR;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG(5, ("NTLMSSP challenge set by NTLM2\n"));
|
DEBUG(5, ("NTLMSSP challenge set by NTLM2\n"));
|
||||||
@ -211,10 +209,7 @@ _PUBLIC_ NTSTATUS cli_credentials_get_ntlm_response(struct cli_credentials *cred
|
|||||||
sizeof(session_nonce),
|
sizeof(session_nonce),
|
||||||
session_key.data);
|
session_key.data);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
if (rc == GNUTLS_E_UNWANTED_ALGORITHM) {
|
return gnutls_error_to_ntstatus(rc, NT_STATUS_NTLM_BLOCKED);
|
||||||
return NT_STATUS_NTLM_BLOCKED;
|
|
||||||
}
|
|
||||||
return NT_STATUS_INTERNAL_ERROR;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ZERO_ARRAY(user_session_key);
|
ZERO_ARRAY(user_session_key);
|
||||||
|
Loading…
Reference in New Issue
Block a user