From 976321dd16134dd23eeb3f1d7ebd6b2b72937440 Mon Sep 17 00:00:00 2001 From: Paul Park Date: Fri, 4 Aug 1995 20:35:33 +0000 Subject: [PATCH] Make passwd_check_opass_ok() available git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6417 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/v5server/passwd.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/kadmin/v5server/passwd.c b/src/kadmin/v5server/passwd.c index 43ab083d8..63453547d 100644 --- a/src/kadmin/v5server/passwd.c +++ b/src/kadmin/v5server/passwd.c @@ -105,7 +105,7 @@ passwd_check_princ(kcontext, debug_level, ticket, /* * 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; @@ -131,6 +131,8 @@ passwd_check_opass_ok(kcontext, debug_level, princ, dbentp, pwdata) kret = key_string_to_keys(kcontext, dbentp, pwdata, + 0, + (krb5_key_salt_tuple *) NULL, &num_keys, &key_list); @@ -207,6 +209,8 @@ passwd_set_npass(kcontext, debug_level, princ, dbentp, pwdata) if (kret = key_string_to_keys(kcontext, dbentp, pwdata, + 0, + (krb5_key_salt_tuple *) NULL, &num_keys, &key_list)) goto cleanup; @@ -246,10 +250,7 @@ passwd_set_npass(kcontext, debug_level, princ, dbentp, pwdata) /* 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; @@ -272,7 +273,7 @@ passwd_set_npass(kcontext, debug_level, princ, dbentp, pwdata) goto cleanup; if (nwrite != 1) - kret = KRB_ERR_GENERIC; + kret = KRB5KRB_ERR_GENERIC; (void) krb5_db_free_principal(kcontext, &entry2write, 1); -- 2.26.2