auth: Add cli_credentials_is_password_nt_hash()
authorAndreas Schneider <asn@samba.org>
Fri, 31 Mar 2023 08:44:16 +0000 (10:44 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 5 Apr 2023 01:06:29 +0000 (01:06 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
auth/credentials/credentials.h
auth/credentials/credentials_ntlm.c

index 023386cd5209453504d852f4f2a5a6792a019c41..c3a048ecc8de932f3060d4679482c03707bc349f 100644 (file)
@@ -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);
index c6c4e96ecdd20a4c343cbd91a7fdd4798e28fafc..38226453c4a566e4ee1224d4f82e06d33b918f8d 100644 (file)
@@ -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)