(RADIATOR) PreHandlerHook in ClientList SQL

Hugh Irvine hugh at open.com.au
Wed Jul 18 17:30:58 CDT 2001


Hello Griff -

I suspect what is happening is that the quotes in the string are not being 
handled properly by SQL (you will need to properly escape those characters). 

In general, I prefer to keep my hooks in files, and refer to them with the 
file:"....." construct:

	PreHandlerHook file:"%D/whatever"

hth

Hugh


On Thursday 19 July 2001 04:11, Griff Hamlin wrote:
> Hello,
>
> I'm trying to convert my client list to an SQL table called Clients.
> I only need three fields, the client_ip, secret, and a PreHandlerHook.
> In my regular client list that I used to have in the radius.cfg file,
> the line looked like this:
>
> <Client 127.0.0.1>
>    Secret mysecret
>    PreHandlerHook sub { ${$_[0]}->add_attr('Router_Group','home'); }
> </Client>
>
> My question is, what part of this PreHandlerHook line do I need to put
> in the prehandlerhook field of my SQL table? Do I need all of it from
> sub through the ending brace or just from ${$ through the last )? I have
> tried both ways so far and received the error:
>
> Wed Jul 18 12:05:29 2001: ERR: Error in PreHandlerHook(): Can't use
> string ("${$_[0]}->add_attr('Router_Group") as a subroutine ref while
> "strict refs" in use at
> /usr/local/lib/perl5/site_perl/5.6.1/Radius/Client.pm line 338.
>
> Thanks for your help.
>
> Griff Hamlin, III
>
> ===
> Archive at http://www.open.com.au/archives/radiator/
> Announcements on radiator-announce at open.com.au
> To unsubscribe, email 'majordomo at open.com.au' with
> 'unsubscribe radiator' in the body of the message.

-- 
Radiator: the most portable, flexible and configurable RADIUS server 
anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list