help-gnu-radius
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gnu-radius] GNU Radius 1.2.94.


From: Irina
Subject: [Help-gnu-radius] GNU Radius 1.2.94.
Date: Sat, 18 Dec 2004 18:09:34 -0500

Hello Sergei or a person who reads this email,

I am looking into upgrading from gnu-radius-0.96.4 to radius-1.2.95.  Plus will 
add MySQL auth and accounting since we are using 2 radiusd servers and 
Simultaneous does not quite work properly.  Trying it out on another machine 
first.

I have received a patch from you in the past that I would apply to acct.c.  
Looking for the same in the new version and can not find where to put it in 
write_detail function.  Also not sure if it will work :-(

The patch is below.  If applied then radiusd creates not a "detail" file but 
"detail-%Y-%m-%d.%H".

Thank you for your help in advance.
Irina
========================================

Index: radiusd/acct.c
--- /home/gray/backup/acct.c Thu Jan 30 23:40:08 2003
+++ acct.c Thu Jan 30 23:40:36 2003
@@ -500,7 +500,18 @@ write_detail(radreq, authtype, f)
  mkdir(dir, 0755);

  /* Write Detail file. */
- path = mkfilename(dir, f);
+        {
+           size_t size;
+           struct tm *tm;
+
+           size = strlen(f) + 15;
+           s = emalloc(size);
+           tm = localtime(&curtime);
+
+           strftime(s, size, "detail-%Y-%m-%d.%H", tm);
+           path = mkfilename(dir, s);
+           free(s);
+        }
  efree(dir);
  if ((outfd = fopen(path, "a")) == (FILE *)NULL) {
  radlog(L_ERR|L_PERROR, _("can't open %s"), path);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]