[RADIATOR] Multi-Line Handler issues with 4.10

Michael ringo at vianet.ca
Fri Aug 10 11:28:53 CDT 2012


i had to make a couple changes for my config to parse properly.
1. move the "ignore blank lines and lines beginning with a hash" process before appending to the $line variable.
2. ignore blank lines including lines with whitespace (next if $_ =~ /^\s*$/;)




--- /usr/src/radiator/4.10/Radiator-4.10+patches+vianet_custom/Radius/Configurable.pm   2012-08-09 10:59:18.000000000 -0400
+++ /etc/radiator/src/radiator-v4.10+patches+vianet_custom/share/perl/5.8.8/Radius/Configurable.pm      2012-08-10 12:23:11.000000000 -0400
@@ -162,16 +162,17 @@ sub parse
      {
  #      print "parsing for $self: $_\n"; # test
  
+       # Ignore blank lines and lines beginning with hash
+       next if $_ =~ /^\s*$/;
+       next if $_ =~ /^\s*#/;
+
         $line .= $_;
         next if ($line =~ s/\\$//); # Line continuation
+
         # Strip leading and trailing white space
         $line =~ s/^\s*//;
         $line =~ s/\s*$//;
  
-       # Ignore blank lines and lines beginning with hash
-       next if $line eq '';
-       $line = '', next if $line =~ /^#/;
-
         # Look for </Objectname> to end the object definition
         last if ($line =~ /^<\/([^>]*)>/);
  






On 12-08-10 11:07 AM, Michael wrote:
> i found some time to try the 4.10 upgrade with patches, but i have this Multi-Line config issue.  Seems to be related to the fact that I have a blank line and comments in the middle of the multi line Handler.
>
>
>
> Fri Aug 10 10:51:18 2012: ERR: Unknown keyword '<Handler' in /etc/radiator/conf/handler.pre-defined line 3
> Fri Aug 10 10:51:18 2012: ERR: Unknown keyword 'Request-Type' in /etc/radiator/conf/handler.pre-defined line 6
>
>
>
> <Handler \
> 	# failed auth attempts many times a day. used to reject a username.
>
>           Request-Type = Access-Request, \
>           User-Name = DISABLED>
>
>           Identifier handler_null
>           SessionDatabase NULL
>           AuthBy AuthBy_REJECT
> </Handler>
>
>
>
>
> On 12-07-06 05:57 AM, Heikki Vatiainen wrote:
>> On 07/03/2012 12:22 AM, Heikki Vatiainen wrote:
>>
>>> If you can wait a little with upgrading I will get back to this later
>>> this week.
>>
>> Patches for 4.10 now restore the functionality while keeping the
>> originally planned multiline change working. Please let us know if there
>> are still problems.
>>
>> Thanks,
>> Heikki
>>
>>
> _______________________________________________
> radiator mailing list
> radiator at open.com.au
> http://www.open.com.au/mailman/listinfo/radiator
>
>


More information about the radiator mailing list