]> git.ipfire.org Git - thirdparty/krb5.git/commit
Refactor KDC krb5_pa_data utility functions
authorGreg Hudson <ghudson@mit.edu>
Thu, 21 Dec 2017 16:28:52 +0000 (11:28 -0500)
committerGreg Hudson <ghudson@mit.edu>
Mon, 12 Mar 2018 14:43:10 +0000 (10:43 -0400)
commit4af478c18b02e1d2444a328bb79e6976ef3d312b
tree1750c6fccc32dd9b119704d30e1cffd455520ad7
parentf8d0877f848563d07152a0ee191fe82846fdb8f1
Refactor KDC krb5_pa_data utility functions

Move alloc_padata from fast_util.c to kdc_util.c and make it
non-static so it can be used by other files.  Rename it to
alloc_pa_data for consistency with add_pa_data_element.  Make it
correctly handle zero length using a null contents pointer.

Make add_pa_data_element claim both the container and contents memory
from the caller, now that callers can use alloc_pa_data to simplify
allocation and copying.  Remove the copy parameter and the unused
context parameter, and put the list parameter first.  Adjust all
callers accordingly, making small simplifications to memory handling
where applicable.
src/kdc/fast_util.c
src/kdc/kdc_preauth.c
src/kdc/kdc_util.c
src/kdc/kdc_util.h