Hello Charles -
On Friday 12 January 2001 09:40, Charles Sprickman wrote:
> Hi all,
>
> > Your problem is because you haven't declared that you are going to use an
> > external subroutine.
>
> Argh. I'm not clear on that. Where would I be declaring that? I thought
> just specifying "PostAuthHook" did that...
>
The PostAuthHook parameter defines the hook and calls it from Radiator, what
I was refering to was the routine that you are trying to call from the hook.
> > It is much easier to pick up a reference to your AuthBy SQL clause and
> > just use that for all database access.
> >
> > my $authby = Radius::AuthGeneric::find('Ipass_SQL');
> > .....
>
> I don't need to touch any auth stuff, I just need to query the RADONLINE
> db... If you can show me how to open a handle to my existing sql
> connection, that would probably fix me up.
>
> > There are some examples of how to do this sort of thing in the Radiator
> > 2.17.1 distribution in the file "goodies/hooks.txt".
>
> Ah, I'm still on 2.16.1, and I see you've added some stuff to that file.
> I still don't really get what's going on there, especially how to refer
> back to variables declared in radiator and it's modules.
>
> Do you (or any list members) have any examples showing how to get a handle
> on a sql connection?
>
> Or is there an easy way to just make "PostAuthHook" call an external
> program?
>
> I think the rest of my code, if not great (or even good), will achieve my
> desired goals...
>
> The main reason I want to implement it in the PostAuthHook is so that I
> can trigger my script on login/logout of IPass people (I've got them in a
> seperate handler).
>
To get a handle to your session database you would do something similar to
the above (I didn't understand what you required the first time):
my $sessdb = Radius::SessGeneric::find('Ipass_SQL');
Then you can use $sessdb to call any routines in SessSQL.pm and any routines
that SessSQL.pm inherits from (including DBD/DBI).
hth
Hugh
ps - in your previous mail you asked this:
# -*- mode: Perl -*-
# PopAuth
# don't really know what the above does...
The first line is an emacs tag that tells emacs to use "mode: Perl" for
editing this file.
--
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.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.