I think, this module needs a little patch.<br />This will prevent uncontrolled situation, when no space left on device. <br /><br />At this moment, if there are no space left, then rlm_detail doesn't return any error, when he cannot flush buffered information to the file. Client continue sending accounting to the primary server, but server cannot save it. As a result - accounting info can be lost.<br /><br />Just meet this problem and it was solved with this code change.<br /><br /><br />--- rlm_detail.c 2011-05-18 09:37:28.000000000 +0300<br />+++ rlm_detail.c.new 2011-05-18 09:41:26.000000000 +0300<br />@@ -185,6 +185,7 @@<br /> int lock_count;<br /> struct timeval tv;<br /> VALUE_PAIR *pair;<br />+ int fpf;<br /> <br /> struct detail_instance *inst = instance;<br /> <br />@@ -463,7 +464,11 @@<br /> RDEBUG2("Released filelock");<br /> }<br /> <br />- fclose(outfp);<br />+ fpf = fclose(outfp);<br />+ if (fpf == EOF) {<br />+ radlog(L_ERR,"rlm_detail: cannot close the file! (%s)", strerror(errno));<br />+ return RLM_MODULE_FAIL;<br />+ }<br /> <br /> /*<br /> * And everything is fine.<br /> <div id="sig_lower"> </div>
<!-- -->