[PATCH] check rlm_detail writes
jwm at horde.net
Sat Oct 23 20:08:29 CEST 2010
I've modified rlm_detail to check its writes and return RLM_MODULE_FAIL on
short writes. I believe this should cause FreeRADIUS to avoid sending an
Accounting-Response to the NAS, so the NAS will retry on disk-full/error
A while ago, I noticed rlm_detail writes were unchecked, causing
FreeRADIUS to exit on an assertion in the detail reader due to the partial
detail entries. Alan kindly fixed the detail reader's behavior in this
situation, and I also wanted to have the detail writer check its writes.
Truncating the detail file on error to remove the partial detail entry isn't
strictly necessary, but it seems like good form and is straightforward.
I haven't yet gotten rid of the vp_print() calls (its write is unchecked,
too) and this patch is untested (though it compiles), but I wanted to get
feedback and see if it's worthwhile for me to finish and test it.
John Morrissey _o /\ ---- __o
jwm at horde.net _-< \_ / \ ---- < \,
www.horde.net/ __(_)/_(_)________/ \_______(_) /_(_)__
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 9044 bytes
Desc: not available
More information about the Freeradius-Devel