robust-proxy-accounting issue
Paul Sherratt
me at paults.com
Fri Dec 3 21:48:53 CET 2010
> It looks like in the example config, detail-%Y%m%d:%H is used on the
> detail writer, and detail-*:* is used on the detail listener, which
> wont match above? So short-term workaround is to just use a single
> detail file.
Following patch submitted to
https://bugs.freeradius.org/bugzilla/show_bug.cgi?id=128
--- a/src/modules/rlm_detail/rlm_detail.c
+++ b/src/modules/rlm_detail/rlm_detail.c
@@ -31,6 +31,7 @@ RCSID("$Id$")
#include <sys/stat.h>
#include <ctype.h>
#include <fcntl.h>
+#include <fnmatch.h>
#define DIRLEN 8192
@@ -477,8 +478,9 @@ static int do_detail(void *instance, REQUEST
*request, RADIUS_PACKET *packet,
static int detail_accounting(void *instance, REQUEST *request)
{
if (request->listener->type == RAD_LISTEN_DETAIL &&
- strcmp(((struct detail_instance *)instance)->detailfile,
- ((listen_detail_t
*)request->listener->data)->filename) == 0) {
+ fnmatch( ((listen_detail_t *)request->listener->data)->filename,
+ ((struct detail_instance *)instance)->detailfile,
+ FNM_FILE_NAME | FNM_PERIOD ) == 0) {
RDEBUG("Suppressing writes to detail file as the
request was just read from a detail file.");
return RLM_MODULE_NOOP;
}
More information about the Freeradius-Devel
mailing list