(RADIATOR) Dynamic Vars

Hugh Irvine hugh at open.com.au
Fri Aug 22 01:55:09 CDT 2003


Hello Nick -

The only thing I can think of is to write your own custom versions of 
those modules so they do what you require.

The source modules are in the "Radius" directory of the Radiator 
distribution.

regards

Hugh


On Friday, Aug 22, 2003, at 09:37 Australia/Melbourne, Nick Rogness 
wrote:

>
> In my radius config file I have:
>
> 	<Client DEFAULT>
> 		.
> 		.
>         	PreHandlerHook file:"/etc/raddb/prehandler.radhook"
> 	</Client>
>
>
> In /etc/raddb/prehandler.radhook I have:
>
> 	.
> 	.
> 	$p->add_attr('CCC-DB',"testdb");
> 	.
>
>
> For my SessionDB I try to reference my %{CCC-DB} variable:
>
> 	<SessionDatabase SQL>
> 	Identifier      SDB
> 	DBSource        dbi:mysql:%{CCC-DB}:db1.domain.com
> 	.
> 	.
>
> But it appears I can't reference it as it comes up with an error:
>
> Wed Aug 20 19:28:01 2003: ERR: do failed for 'delete from RADONLINE 
> where
> NASIDENTIFIER='203.63.154.1' and NASPORT=01234': No Database Selected
>
> So I'm assuming that you can only reference certain %{attr} in certain
> cases.  I want to be able to use the same sessionDB "template" and 
> have it
> reference different databases as determined by the PreHandlerHook.  I
> don't want to build 50 different <SessionDatabase ...> statements for 
> all
> of our customers (since they all have different DBs).  How can I
> accomplish this?
>
> Same problem exists for <AuthBy SQL> DBSource directives.  I want the
> Prehandler to choose the database to connect to.  Any pointers?
>
> Thanks,
>
> Nick Rogness
>
> ===
> 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 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