(RADIATOR) Retrieving a hook by filename from inside ClientListSQL
Hugh Irvine
hugh at open.com.au
Thu Jan 30 17:04:56 CST 2003
Hello Toomas, Hello Claudio -
I have been thinking about this a bit more, and there are alternative
approaches that you could consider.
The first would be a StartupHook that compiles code with multiple entry
points and then patches those entry points into the Client structures
that have been built from the database (probably using the Identifier
tags).
The second would be a generic PreClientHook that checks to see for
which Client clause the current request is destined for, then does the
processing for that Client.
Both of these approaches are a bit more complicated than using
PreHandlerHooks in the Client clauses directly, but at least its
possible.
regards
Hugh
On Friday, Jan 31, 2003, at 09:38 Australia/Melbourne, Mike McCauley
wrote:
> Hello Claudio and Toomas,
>
>
> On Fri, 31 Jan 2003 09:27 am, Hugh Irvine wrote:
>> Mikey -
>>
>> Could you answer this please?
>>
>> ta
>>
>> Hugh
>>
>> Begin forwarded message:
>>> From: Toomas Kärner <tomkar at estpak.ee>
>>> Date: Fri Jan 31, 2003 02:36:44 Australia/Melbourne
>>> To: "Claudio Lapidus" <c_lapidus at hotmail.com>, <radiator at open.com.au>
>>> Subject: Re: (RADIATOR) Retrieving a hook by filename from inside
>>> ClientListSQL
>>>
>>> Hi,
>>>
>>> Any comments? ... I have the same issue.
>>>
>>> Rgds.
>>> Toomas Kärner
>>> ----- Original Message -----
>>> From: "Claudio Lapidus" <c_lapidus at hotmail.com>
>>> To: <radiator at open.com.au>
>>> Sent: Wednesday, August 07, 2002 12:01 AM
>>> Subject: (RADIATOR) Retrieving a hook by filename from inside
>>> ClientListSQL
>>>
>>>> Hello,
>>>>
>>>> I need to get the PreHandlerHook for certain clients from our
>>>> standard
>>>> RADCLIENTLIST SQL table. The problem is that I'd prefer to store the
>>>> hook
>>>> code in a file and not directly inside the table, for various
>>>> reasons.
>>>>
>>>> I've setup this config and it works fine:
>>>>
>>>> <Client x.x.x.x>
>>>> Secret shhhh
>>>> PreHandlerHook file:"%D/preauth.pl"
>>>> </Client>
>>>>
>>>> As expected, the hook gets executed for this particular client.
>>>> However,
>>>> this one doesn't work:
>>>>
>>>> <ClientListSQL>
>>>> DBSource dbi:mysql:radiator
>>>> DBUsername sqluser
>>>> DBAuth donttellya
>>>> </ClientListSQL>
>>>>
>>>> from the table we get:
>>>>
>>>> mysql> select NASIDENTIFIER, SECRET, PREHANDLERHOOK from
>>>> RADCLIENTLIST;
>>>> +---------------+-------------+----------------------+
>>>>
>>>> | NASIDENTIFIER | SECRET | PREHANDLERHOOK |
>>>>
>>>> +---------------+-------------+----------------------+
>>>>
>>>> | x.x.x.x | shhhh | file:"%D/preauth.pl" |
>>>>
>>>> +---------------+-------------+----------------------+
>>>> 1 row in set (0.00 sec)
>>>>
>>>> By seeing further action it is apparent that the hook doesn't get
>>>> executed
>>>> this time. However, even at level 4 trace doesn't show anything
>>>> regarding
>>>> this step. I also tried changing double quotes to single quotes in
>>>> the
>>>
>>> field
>>>
>>>> contents, to no avail. So:
>>>>
>>>> 1. Is it legal to store the hook's filename into the table instead
>>>> of
>>>> the
>>>> code itself? (I hope so :-)
>
> No. The file:".."syntax is recognised by the config file parser, so it
> only
> works in the config file.
>
>
>>>>
>>>> 2. Is there a way to increase debug verbosity for ClientListSQL
>>>
>>> operations?
> Only by adding more
>
> $self->log($main::LOG_DEBUG, ...);
> lines.
>
> If you have a particular need for more debug, let me know where, and I
> will
> see if we can add it.
>
> Cheers.
>
>
>>>
>>>> TIA,
>>>> cl.
>>>>
>>>>
>>>> _________________________________________________________________
>>>> Chat with friends online, try MSN Messenger:
>>>> http://messenger.msn.com
>>>>
>>>> ===
>>>> 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.
>>>
>>> ===
>>> 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.
>
> --
> Mike McCauley mikem at open.com.au
> Open System Consultants Pty. Ltd Unix, Perl, Motif, C++, WWW
> 24 Bateman St Hampton, VIC 3188 Australia http://www.open.com.au
> Phone +61 3 9598-0985 Fax +61 3 9598-0955
>
> Radiator: the most portable, flexible and configurable RADIUS server
> anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
> Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS,
> TTLS, PEAP etc on Unix, Windows, MacOS etc.
>
>
--
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