]> git.ipfire.org Git - thirdparty/krb5.git/commit
Simplify kdb_cpw.c
authorGreg Hudson <ghudson@mit.edu>
Mon, 25 Aug 2014 23:14:50 +0000 (19:14 -0400)
committerGreg Hudson <ghudson@mit.edu>
Fri, 5 Sep 2014 18:48:12 +0000 (14:48 -0400)
commit759a8e1001ac21161d26eb1dc80c6601fb379964
treeb9a82dbe317b442c56509dd9c8d56b47f41d4e4a
parent8ee40f56e6c789a87dc403bf70d524d2b3b21dbf
Simplify kdb_cpw.c

In add_key_rnd, stop looking up the krbtgt DB entry; we have not used
it since 1.1.

Use copy_key_data in add_key_rnd and add_key_pwd.

krb5_dbe_crk, krb5_dbe_ark, krb5_dbe_def_cpw, and krb5_dbe_apw all
contained similar logic.  Consolidate all of them into a static helper
function which does the work of all four.  The ark/apw variants had
slightly different behavior then crk/cpw with keepold=true, so
introduce a three-value enum to express all three behaviors.
src/lib/kdb/kdb_cpw.c