summaryrefslogtreecommitdiff
path: root/auth/credentials/credentials.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-12-16 13:58:11 +0000
committerStefan Metzmacher <metze@samba.org>2014-12-19 13:15:13 +0100
commit826b0f761e07987fbe067badde665c3d1c99e821 (patch)
treea936bc9caae2fe182c84a984a5a5f174ebe828dd /auth/credentials/credentials.h
parent153938a1f2a06fec5b2f7daef12200a504fb92f4 (diff)
downloadsamba-826b0f761e07987fbe067badde665c3d1c99e821.tar.gz
auth/credentials: add cli_credentials_set_utf16_password()
We need a way to initialize the cli_credentials from the raw utf16 blob, which might not be completely valid utf16, which means the conversion from CH_UTF16MUNGED to CH_UTF8 might loose information. This would result in an invalid nt_hash, when we convert back from CH_UTF8 to CH_UTF16LE. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11016 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'auth/credentials/credentials.h')
-rw-r--r--auth/credentials/credentials.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/auth/credentials/credentials.h b/auth/credentials/credentials.h
index 2da47d2cac3..814f01648b0 100644
--- a/auth/credentials/credentials.h
+++ b/auth/credentials/credentials.h
@@ -191,6 +191,9 @@ enum netr_SchannelType cli_credentials_get_secure_channel_type(struct cli_creden
time_t cli_credentials_get_password_last_changed_time(struct cli_credentials *cred);
void cli_credentials_set_kvno(struct cli_credentials *cred,
int kvno);
+bool cli_credentials_set_utf16_password(struct cli_credentials *cred,
+ const DATA_BLOB *password_utf16,
+ enum credentials_obtained obtained);
bool cli_credentials_set_nt_hash(struct cli_credentials *cred,
const struct samr_Password *nt_hash,
enum credentials_obtained obtained);