[PATCH 2/4] Utility functions to move allocations from k5buf/krb5_data to gss_buffer_t

Greg Hudson ghudson at MIT.EDU
Thu Oct 6 13:42:14 EDT 2011

These helper names are much too long.  Since they have no external
linkage and aren't public, they don't need namespace prefixes.  I
suggest "k5buf_to_gss" and "data_to_gss".

Both helpers need explanatory comments to note that they invalidate the
source objects.

Don't muck with the internals of a k5buf in the k5buf helper.  There's
currently no API to invalidate a k5buf (it's assumed that the caller is
smart enough to stop using it if it takes ownership of the data
pointer), so just don't do that for now.

In the krb5_data helper, setting input_k5data = NULL does nothing.  Set
*input_k5data = empty_data().

More information about the krbdev mailing list