kadm5: add chpass_with_key hook (#397)

Add a hook for changing a password with a key. This hook should be consolidated
into one shared with randkey and setkey, but for now I have continued to have
the hooks follow the kadm5 APIs themselves in both signature and quantity.

(This means the randkey one isn't actually very useful because it doesn't
provide the hook with the keys.)
This commit is contained in:
Luke Howard
2019-01-10 15:18:10 +11:00
parent 59ba12f832
commit 57c25d9828
3 changed files with 100 additions and 0 deletions

View File

@@ -75,6 +75,15 @@ typedef struct kadm5_hook_ftable {
krb5_key_salt_tuple *ks_tuple,
const char *password);
krb5_error_code (KRB5_CALLCONV *chpass_with_key)(krb5_context context,
void *data,
enum kadm5_hook_stage stage,
krb5_error_code code,
krb5_const_principal princ,
uint32_t flags,
size_t n_key_data,
krb5_key_data *key_data);
krb5_error_code (KRB5_CALLCONV *create)(krb5_context context,
void *data,
enum kadm5_hook_stage stage,