* cc_file.c: Add buffering on reading.
authorKen Raeburn <raeburn@mit.edu>
Sun, 15 Aug 2004 23:56:00 +0000 (23:56 +0000)
committerKen Raeburn <raeburn@mit.edu>
Sun, 15 Aug 2004 23:56:00 +0000 (23:56 +0000)
commit10b8410a6e9564e76aeb7b178b0c941faaa0f7f9
treedbad0e3ef03f9be7d9551da8adc53c02eed3130a
parent6366c48e75aef798885046a93952b9cdd6f1f83a
* cc_file.c: Add buffering on reading.
(FCC_BUFSIZ): New macro.
(struct _krb5_fcc_data): Add new fields buf, valid_bytes, cur_offset.
(krb5_fcc_resolve, krb5_fcc_generate_new): Initialize valid_bytes.
(invalidate_cache): New function.
(krb5_fcc_write, krb5_fcc_open_file, krb5_fcc_destroy): Call invalidate_cache.
(fcc_lseek): New function.
(krb5_fcc_skip_header, krb5_fcc_destroy, krb5_fcc_start_seq_get,
krb5_fcc_next_cred, krb5_fcc_store): Use fcc_lseek instead of lseek.
(fcc_read): Use and maybe refill the buffer.
(dereference): Zap the contents of the buffer before freeing it.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16666 dc483132-0cff-0310-8789-dd5450dbe970
src/lib/krb5/ccache/ChangeLog
src/lib/krb5/ccache/cc_file.c