/*
* passwd_check_opass_ok() - Check of specified old password is good.
*/
-static krb5_boolean
+krb5_boolean
passwd_check_opass_ok(kcontext, debug_level, princ, dbentp, pwdata)
krb5_context kcontext;
int debug_level;
kret = key_string_to_keys(kcontext,
dbentp,
pwdata,
+ 0,
+ (krb5_key_salt_tuple *) NULL,
&num_keys,
&key_list);
if (kret = key_string_to_keys(kcontext,
dbentp,
pwdata,
+ 0,
+ (krb5_key_salt_tuple *) NULL,
&num_keys,
&key_list))
goto cleanup;
/* Set the time for last successful password change */
if (kret = krb5_timeofday(kcontext, &now))
goto cleanup;
- pwchg->tl_data_contents[0] = (unsigned char) ((now >> 24) & 0xff);
- pwchg->tl_data_contents[1] = (unsigned char) ((now >> 16) & 0xff);
- pwchg->tl_data_contents[2] = (unsigned char) ((now >> 8) & 0xff);
- pwchg->tl_data_contents[3] = (unsigned char) (now & 0xff);
+ krb5_kdb_encode_int32(now, pwchg->tl_data_contents);
}
else {
kret = ENOMEM;
goto cleanup;
if (nwrite != 1)
- kret = KRB_ERR_GENERIC;
+ kret = KRB5KRB_ERR_GENERIC;
(void) krb5_db_free_principal(kcontext, &entry2write, 1);