diff options
author | Greg Hudson <ghudson@mit.edu> | 2010-02-24 18:57:08 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2010-02-24 18:57:08 +0000 |
commit | 052976b4e0c28736d0b363fc8ff37b7d1cb3a1fe (patch) | |
tree | ea360d4f17d7f522c7daf83206f53e522bc41891 /src/lib/kadm5 | |
parent | bf59f3c674fa8de3942dd80ed120143bd6dad5b7 (diff) | |
download | krb5-052976b4e0c28736d0b363fc8ff37b7d1cb3a1fe.zip krb5-052976b4e0c28736d0b363fc8ff37b7d1cb3a1fe.tar.gz krb5-052976b4e0c28736d0b363fc8ff37b7d1cb3a1fe.tar.bz2 |
Two problems in kadm5_get_principal mask handling
KADM5_MOD_NAME was being applied to entry->principal instead of
entry->mod_name. KADM5_MKVNO was not being applied to entry->mkvno.
Patch from Marcus Watts <mdw@umich.edu>.
ticket: 6668
target_version: 1.8
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23749 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/kadm5')
-rw-r--r-- | src/lib/kadm5/srv/svr_principal.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/kadm5/srv/svr_principal.c b/src/lib/kadm5/srv/svr_principal.c index 3cb3b6b..469a8e8 100644 --- a/src/lib/kadm5/srv/svr_principal.c +++ b/src/lib/kadm5/srv/svr_principal.c @@ -858,8 +858,8 @@ kadm5_get_principal(void *server_handle, krb5_principal principal, if (! (mask & KADM5_MOD_TIME)) entry->mod_date = 0; if (! (mask & KADM5_MOD_NAME)) { - krb5_free_principal(handle->context, entry->principal); - entry->principal = NULL; + krb5_free_principal(handle->context, entry->mod_name); + entry->mod_name = NULL; } } @@ -871,10 +871,12 @@ kadm5_get_principal(void *server_handle, krb5_principal principal, if (kdb.key_data[i].key_data_kvno > entry->kvno) entry->kvno = kdb.key_data[i].key_data_kvno; - ret = krb5_dbe_get_mkvno(handle->context, &kdb, master_keylist, - &entry->mkvno); - if (ret) - goto done; + if (mask & KADM5_MKVNO) { + ret = krb5_dbe_get_mkvno(handle->context, &kdb, master_keylist, + &entry->mkvno); + if (ret) + goto done; + } if (mask & KADM5_MAX_RLIFE) entry->max_renewable_life = kdb.max_renewable_life; |