(RADIATOR) Database access from hook files
Hugh Irvine
hugh at open.com.au
Tue Jul 20 01:04:46 CDT 2004
Hello Denis -
This has been discussed before on the mailing list:
www.open.com.au/archives/radiator
Basically you use an AuthBy SQL clause with an Identifier
<AuthBy SQL>
Identifier SQLAuthByHandle
.....
</AuthBy>
then in your hook code you use AuthGeneric->find('SQLAuthByHandle')
See the examples in "goodies/hooks.txt".
regards
Hugh
On 20 Jul 2004, at 15:48, Denis Dowling wrote:
> Just wondering if anyone has an example of how to get the database
> handle in
> a hook file. I am currently just creating a new database connection
> with:
>
> my $dbh = DBI->connect( 'dbi:Oracle:xxx', 'xxx', 'xx' ) || die "Could
> not
> connect to the database: DBI:errstr";
>
> There is a lot of code in SqlDb.pm that handles database failover and
> timeout that would be nice to use as Radiator in this instance is
> configured
> to fall back to a backup database if the primary is offline. I also
> want to
> ensure that the hook file uses the same database as the Auth realm is
> using.
>
> Regards,
> Denis
>
>
>
> --
> 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.
>
>
NB: have you included a copy of your configuration file (no secrets),
together with a trace 4 debug showing what is happening?
--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
-
CATool: Private Certificate Authority for Unix and Unix-like systems.
--
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