I think, this module needs a little patch.
This will prevent uncontrolled situation, when no space left on device.

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.

Just meet this problem and it was solved with this code change.


--- rlm_detail.c        2011-05-18 09:37:28.000000000 +0300
+++ rlm_detail.c.new    2011-05-18 09:41:26.000000000 +0300
@@ -185,6 +185,7 @@
        int             lock_count;
        struct timeval  tv;
        VALUE_PAIR      *pair;
+       int             fpf;
 
        struct detail_instance *inst = instance;
 
@@ -463,7 +464,11 @@
                RDEBUG2("Released filelock");
        }
 
-       fclose(outfp);
+       fpf = fclose(outfp);
+       if (fpf == EOF) {
+               radlog(L_ERR,"rlm_detail: cannot close the file! (%s)", strerror(errno));
+               return RLM_MODULE_FAIL;
+       }
 
        /*
         *      And everything is fine.