Steve Langasek <[EMAIL PROTECTED]> writes:

> Hey, so I guess forgetting that you've created a zero-length
> /etc/krb5.keytab for testing on a system that you're later trying to
> convert to use pam_krb5 is a good way to motivate oneself to find and
> fix this bug...

> It turns out that the problem is buggy handling of fread() in
> src/lib/krb5/keytab/kt_file.c; the code assumes that fread only returns
> 0 upon error, when it can, of course, also return 0 if there are 0 bytes
> to be read. :)  So it sets kerror to 0 (errno), closes the file but
> doesn't completely clean up, and the FILE* gets double-freed.

> Possible patch attached, reassigned and downgraded.

Yup, thanks, this looks right to me.  I'll apply this to the next release,
unless Sam has any objections.

-- 
Russ Allbery ([EMAIL PROTECTED])               <http://www.eyrie.org/~eagle/>


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to