Thanks, the patch has been applied and will appear in a future release.
* misc.c (chpass_principal_wrapper_3): Renamed from
chpass_principal_wrapper; calls chpass_principal_3 now.
(randkey_principal_wrapper_3): Renamed from
randkey_principal_wrapper; calls randkey_principal_3 now. Patch
from Ben Cox.
* server_stubs.c (chpass_principal_1_svc)
(chpass_principal3_1_svc): Call chpass_principal_wrapper_3.
(chrand_principal_1_svc, chrand_principal3_1_svc): Call
randkey_principal_wrapper_3. Patch from Ben Cox.
ticket: 1207
version_reported: 1.2.6
target_version: 1.3
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14915
dc483132-0cff-0310-8789-
dd5450dbe970
+2002-10-08 Tom Yu <tlyu@mit.edu>
+
+ * misc.c (chpass_principal_wrapper_3): Renamed from
+ chpass_principal_wrapper; calls chpass_principal_3 now.
+ (randkey_principal_wrapper_3): Renamed from
+ randkey_principal_wrapper; calls randkey_principal_3 now. Patch
+ from Ben Cox.
+
+ * server_stubs.c (chpass_principal_1_svc)
+ (chpass_principal3_1_svc): Call chpass_principal_wrapper_3.
+ (chrand_principal_1_svc, chrand_principal3_1_svc): Call
+ randkey_principal_wrapper_3. Patch from Ben Cox.
+
2002-08-29 Ken Raeburn <raeburn@mit.edu>
* Makefile.in: Revert $(S)=>/ change, for Windows support.
#include "misc.h"
/*
- * Function: chpass_principal_wrapper
+ * Function: chpass_principal_wrapper_3
*
* Purpose: wrapper to kadm5_chpass_principal that checks to see if
* pw_min_life has been reached. if not it returns an error.
* Arguments:
* principal (input) krb5_principals whose password we are
* changing
- * passoword (input) password we are going to change to.
+ * keepold (input) whether to preserve old keys
+ * n_ks_tuple (input) the number of key-salt tuples in ks_tuple
+ * ks_tuple (input) array of tuples indicating the caller's
+ * requested enctypes/salttypes
+ * password (input) password we are going to change to.
* <return value> 0 on success error code on failure.
*
* Requires:
*
*/
kadm5_ret_t
-chpass_principal_wrapper(void *server_handle,
- krb5_principal principal, char *password)
+chpass_principal_wrapper_3(void *server_handle,
+ krb5_principal principal,
+ krb5_boolean keepold,
+ int n_ks_tuple,
+ krb5_key_salt_tuple *ks_tuple,
+ char *password)
{
krb5_int32 now;
kadm5_ret_t ret;
if (ret)
return ret;
- return kadm5_chpass_principal(server_handle, principal, password);
+ return kadm5_chpass_principal_3(server_handle, principal,
+ keepold, n_ks_tuple, ks_tuple,
+ password);
}
/*
- * Function: randkey_principal_wrapper
+ * Function: randkey_principal_wrapper_3
*
* Purpose: wrapper to kadm5_randkey_principal which checks the
passwords min. life.
* Arguments:
* principal (input) krb5_principal whose password we are
* changing
+ * keepold (input) whether to preserve old keys
+ * n_ks_tuple (input) the number of key-salt tuples in ks_tuple
+ * ks_tuple (input) array of tuples indicating the caller's
+ * requested enctypes/salttypes
* key (output) new random key
* <return value> 0, error code on error.
*
*
*/
kadm5_ret_t
-randkey_principal_wrapper(void *server_handle,
- krb5_principal principal,
- krb5_keyblock **keys, int *n_keys)
+randkey_principal_wrapper_3(void *server_handle,
+ krb5_principal principal,
+ krb5_boolean keepold,
+ int n_ks_tuple,
+ krb5_key_salt_tuple *ks_tuple,
+ krb5_keyblock **keys, int *n_keys)
{
krb5_int32 now;
ret = kadm5_free_principal_ent(handle->lhandle, &princ);
if (ret)
return ret;
- return kadm5_randkey_principal(server_handle, principal, keys, n_keys);
+ return kadm5_randkey_principal_3(server_handle, principal,
+ keepold, n_ks_tuple, ks_tuple,
+ keys, n_keys);
}
}
if (cmp_gss_krb5_name(handle, rqstp->rq_clntcred, arg->princ)) {
- ret.code = chpass_principal_wrapper((void *)handle, arg->princ,
- arg->pass);
+ ret.code = chpass_principal_wrapper_3((void *)handle, arg->princ,
+ FALSE, 0, NULL, arg->pass);
} else if (!(CHANGEPW_SERVICE(rqstp)) &&
acl_check(handle->context, rqstp->rq_clntcred,
ACL_CHANGEPW, arg->princ, NULL)) {
}
if (cmp_gss_krb5_name(handle, rqstp->rq_clntcred, arg->princ)) {
- ret.code = chpass_principal_wrapper((void *)handle, arg->princ,
- arg->pass);
+ ret.code = chpass_principal_wrapper_3((void *)handle, arg->princ,
+ arg->keepold,
+ arg->n_ks_tuple,
+ arg->ks_tuple,
+ arg->pass);
} else if (!(CHANGEPW_SERVICE(rqstp)) &&
acl_check(handle->context, rqstp->rq_clntcred,
ACL_CHANGEPW, arg->princ, NULL)) {
}
if (cmp_gss_krb5_name(handle, rqstp->rq_clntcred, arg->princ)) {
- ret.code = randkey_principal_wrapper((void *)handle,
- arg->princ, &k, &nkeys);
+ ret.code = randkey_principal_wrapper_3((void *)handle, arg->princ,
+ FALSE, 0, NULL, &k, &nkeys);
} else if (!(CHANGEPW_SERVICE(rqstp)) &&
acl_check(handle->context, rqstp->rq_clntcred,
ACL_CHANGEPW, arg->princ, NULL)) {
}
if (cmp_gss_krb5_name(handle, rqstp->rq_clntcred, arg->princ)) {
- ret.code = randkey_principal_wrapper((void *)handle,
- arg->princ, &k, &nkeys);
+ ret.code = randkey_principal_wrapper_3((void *)handle, arg->princ,
+ arg->keepold,
+ arg->n_ks_tuple,
+ arg->ks_tuple,
+ &k, &nkeys);
} else if (!(CHANGEPW_SERVICE(rqstp)) &&
acl_check(handle->context, rqstp->rq_clntcred,
ACL_CHANGEPW, arg->princ, NULL)) {