]> git.ipfire.org Git - thirdparty/krb5.git/commit
Modernize cc_file.c and cc_keyring.c
authorGreg Hudson <ghudson@mit.edu>
Sun, 4 May 2014 15:57:16 +0000 (11:57 -0400)
committerGreg Hudson <ghudson@mit.edu>
Sat, 17 May 2014 23:04:27 +0000 (19:04 -0400)
commitd3dd3d147aa403135d07bfca685aced769e361c2
tree0ff5580a1c8ebd4476a98e5af1c17aa099196bbe
parenta4e5127bec346fbc199e3624dc973c4b5d78df71
Modernize cc_file.c and cc_keyring.c

Rename functions not to use the krb5_ prefix, and to use the fcc_ or
krcc_ prefixes only for ccache method implementations.  Use shorter
function comments and add missing comments in some cases.  Remove
forward declarations where they aren't needed.  Use native types
(uint16_t, void *, etc.) in preference to Kerberos type wrappers.  Use
"ret" as the variable name for krb5_error_code return values.  Use 0
instead of KRB5_OK.  Make whitespace conform to current practice.
Remove old #if 0 blocks.  Don't cast to and from void * or between
integer types when C guarantees an implicit cast.  Use literal 2 and 4
for the size of fixed-width 16-bit and 32-bit types.

In cc_file.c, rewrite the header comment to specify the header format
as updated by version 4 and refer to ccmarshal.c for the principal and
credential format.  Also add a helper function to return the cache
version as an integer from 1 to 4, allowing more concise version
checks.
src/lib/krb5/ccache/cc_file.c
src/lib/krb5/ccache/cc_keyring.c