diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-03-01 19:55:46 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-03-01 19:55:46 +0100 |
commit | 94069bd2747a8397308c0b0b384f7bb4edd8f68b (patch) | |
tree | ace3c4fa9d0cb134d4e904354bd33b395c1e1289 /source4/kdc | |
parent | bbe2d30f66ebd8537203870b1225179f03d42744 (diff) | |
download | samba-94069bd2747a8397308c0b0b384f7bb4edd8f68b.tar.gz samba-94069bd2747a8397308c0b0b384f7bb4edd8f68b.tar.bz2 samba-94069bd2747a8397308c0b0b384f7bb4edd8f68b.zip |
s4: Use same function signature for convert_* as s3.
Diffstat (limited to 'source4/kdc')
-rw-r--r-- | source4/kdc/kpasswdd.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/source4/kdc/kpasswdd.c b/source4/kdc/kpasswdd.c index 85e248dceb..67404af2ab 100644 --- a/source4/kdc/kpasswdd.c +++ b/source4/kdc/kpasswdd.c @@ -219,7 +219,7 @@ static bool kpasswd_process_request(struct kdc_server *kdc, DATA_BLOB *reply) { struct auth_session_info *session_info; - ssize_t pw_len; + size_t pw_len; if (!NT_STATUS_IS_OK(gensec_session_info(gensec_security, &session_info))) { @@ -233,13 +233,11 @@ static bool kpasswd_process_request(struct kdc_server *kdc, case KRB5_KPASSWD_VERS_CHANGEPW: { DATA_BLOB password; - pw_len = convert_string_talloc_convenience(mem_ctx, lp_iconv_convenience(kdc->task->lp_ctx), + if (!convert_string_talloc_convenience(mem_ctx, lp_iconv_convenience(kdc->task->lp_ctx), CH_UTF8, CH_UTF16, (const char *)input->data, input->length, - (void **)&password.data, false); - - if (pw_len == -1) { + (void **)&password.data, &pw_len, false)) { return false; } password.length = pw_len; @@ -281,12 +279,11 @@ static bool kpasswd_process_request(struct kdc_server *kdc, reply); } - pw_len = convert_string_talloc_convenience(mem_ctx, lp_iconv_convenience(kdc->task->lp_ctx), + if (!convert_string_talloc_convenience(mem_ctx, lp_iconv_convenience(kdc->task->lp_ctx), CH_UTF8, CH_UTF16, (const char *)chpw.newpasswd.data, chpw.newpasswd.length, - (void **)&password.data, false); - if (pw_len == -1) { + (void **)&password.data, &pw_len, false)) { free_ChangePasswdDataMS(&chpw); return false; } |