diff options
author | Andreas Schneider <asn@samba.org> | 2019-06-11 15:22:06 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-06-24 06:11:17 +0000 |
commit | b21af2f173b9b653f81e6a45a18b9505f1c4086c (patch) | |
tree | fbb62038b7003622e486b9336a4cce39d38c5f80 /auth | |
parent | aaf41bf96fdba39239c4aa6c8c9ed7386b27f507 (diff) | |
download | samba-b21af2f173b9b653f81e6a45a18b9505f1c4086c.tar.gz |
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>
Diffstat (limited to 'auth')
-rw-r--r-- | auth/credentials/credentials_ntlm.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/auth/credentials/credentials_ntlm.c b/auth/credentials/credentials_ntlm.c index fa632fdeda3..f437ee50879 100644 --- a/auth/credentials/credentials_ntlm.c +++ b/auth/credentials/credentials_ntlm.c @@ -28,6 +28,7 @@ #include "auth/credentials/credentials.h" #include "auth/credentials/credentials_internal.h" +#include "libcli/util/gnutls_error.h" #include <gnutls/gnutls.h> #include <gnutls/crypto.h> @@ -175,10 +176,7 @@ _PUBLIC_ NTSTATUS cli_credentials_get_ntlm_response(struct cli_credentials *cred sizeof(session_nonce), session_nonce_hash); if (rc < 0) { - if (rc == GNUTLS_E_UNWANTED_ALGORITHM) { - return NT_STATUS_NTLM_BLOCKED; - } - return NT_STATUS_INTERNAL_ERROR; + return gnutls_error_to_ntstatus(rc, NT_STATUS_NTLM_BLOCKED); } 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), session_key.data); if (rc < 0) { - if (rc == GNUTLS_E_UNWANTED_ALGORITHM) { - return NT_STATUS_NTLM_BLOCKED; - } - return NT_STATUS_INTERNAL_ERROR; + return gnutls_error_to_ntstatus(rc, NT_STATUS_NTLM_BLOCKED); } ZERO_ARRAY(user_session_key); |