I propose the following change to radiusd for the next release:

*** 87,92 ****
--- 87,93 ----

       't', sub { $time },
       'T', sub { $packet->code },
+      'U', sub { my @n = split(/@/,
$packet->getAttrByNum($Radius::Radius::USER_NAME)); $n[0] },
       'y', sub { $year%100 },
       'Y', sub { $year+1900 }, # Correct Y2K behaviour for perl
       );
***************
*** 498,504 ****
        = localtime($time);
      local $packet = $current_packet;

!     $s =~ s/%([%acCdDhHLmMNnRtTyY])/&{$main::conversions{$1}}()/egs;
      $s =~ s/%\{([^{]+)\}/{$packet->get_attr($1)}/egs;

      return $s;
--- 499,505 ----
        = localtime($time);
      local $packet = $current_packet;

!     $s =~ s/%([%acCdDhHLmMNnRtTUyY])/&{$main::conversions{$1}}()/egs;
      $s =~ s/%\{([^{]+)\}/{$packet->get_attr($1)}/egs;

      return $s;


This is making my SQL life so much easier because I can now log the userid
and realm in separate fields.

I use the following:

<Realm /proaxis.(com|net)/>
   RewriteUsername   s/^([^@]+).*/$1\@proaxis.com/

so that I always have a realm and it is always what I expect. Then I log
all 3 %R, %U, %n and I can do report queries anyway I like. (call me
picky :-)

Steve

---
Steve Roderick                                  ProAxis Communications, Inc.
[EMAIL PROTECTED]                               Internet Access Provider
                                                (541) 757-0248


===
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to