summaryrefslogtreecommitdiff
path: root/auth
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2023-03-31 10:44:16 +0200
committerAndrew Bartlett <abartlet@samba.org>2023-04-05 01:06:29 +0000
commit61424dd22180a4f84eb11f4ae8263d53904f6e45 (patch)
treedf8ea92891d314623162019bc46e046390cf1602 /auth
parent97c0982bad9e29955e763bf3d48fab9dc586ba37 (diff)
downloadsamba-61424dd22180a4f84eb11f4ae8263d53904f6e45.tar.gz
auth: Add cli_credentials_is_password_nt_hash()
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'auth')
-rw-r--r--auth/credentials/credentials.h1
-rw-r--r--auth/credentials/credentials_ntlm.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/auth/credentials/credentials.h b/auth/credentials/credentials.h
index 023386cd520..c3a048ecc8d 100644
--- a/auth/credentials/credentials.h
+++ b/auth/credentials/credentials.h
@@ -224,6 +224,7 @@ bool cli_credentials_set_old_utf16_password(struct cli_credentials *cred,
const DATA_BLOB *password_utf16);
void cli_credentials_set_password_will_be_nt_hash(struct cli_credentials *cred,
bool val);
+bool cli_credentials_is_password_nt_hash(struct cli_credentials *cred);
bool cli_credentials_set_nt_hash(struct cli_credentials *cred,
const struct samr_Password *nt_hash,
enum credentials_obtained obtained);
diff --git a/auth/credentials/credentials_ntlm.c b/auth/credentials/credentials_ntlm.c
index c6c4e96ecdd..38226453c4a 100644
--- a/auth/credentials/credentials_ntlm.c
+++ b/auth/credentials/credentials_ntlm.c
@@ -458,6 +458,11 @@ _PUBLIC_ void cli_credentials_set_password_will_be_nt_hash(struct cli_credential
cred->password_will_be_nt_hash = val;
}
+_PUBLIC_ bool cli_credentials_is_password_nt_hash(struct cli_credentials *cred)
+{
+ return cred->password_will_be_nt_hash;
+}
+
_PUBLIC_ bool cli_credentials_set_nt_hash(struct cli_credentials *cred,
const struct samr_Password *nt_hash,
enum credentials_obtained obtained)