Single-byte I/O for keytab reads
Ken Hornstein
kenh at cmf.nrl.navy.mil
Thu Jun 27 17:10:00 EDT 2002
So I've noticed during some system call traces that all I/O done on
credential caches involve read()ing a byte at a time. I did some research
on this one, and I believe I've found the culprit.
In $(src)/lib/krb5/keytab/file/ktf_util.c, I see a number of calls like
this:
setbuf(KTFILEP(id), NILL);
Which according to the man page makes the I/O completely unbuffered.
I assume the reason this was done was to do the "right" thing when
writing a new keytab entry, but it makes reading a lot more inefficient.
Does the use of this still make sense, even for writing a new entry?
--Ken
More information about the krbdev
mailing list