(RADIATOR) Variable Passing in Config Files
    Jay Pike 
    jay.pike at corecomm.com
       
    Tue Feb 18 14:18:36 CST 2003
    
    
  
Hello All,
	I have what I hope is a simple question.  Is there a way to
pass variables around in the config file?
	I've RTFM'd and found variables for use in filenames, date
formatting, etc, but, what I'm looking to do is twofold:
	a) Have two configs: one that is used globally across all
authentication servers and the other one which holds specific
information about that local server.
	b) Pass variables from within an <Handler ...> statement to SQL
select statmenets within the <AuthBy ...> statements.
Part A
------
	Currently, I'm doing this using the include syntax, but, I
either have to do multiple includes, or I have to include large chunks
of the config file in the local config file.
	Things that I'm changing on a host-per-host config file level:
	- AuthPort
	- AcctPort
	- BindAddress
	- DBSource
	- <Monitor> - 'Clients' line
	Rather than have to specify these as specific per host, I would
like to be able to specify these values as variables in the radius.cfg
and just include their actual values in a local file, say,
radius-local.cfg.
Part B
------
	I currently have about 20 or 30 <AuthBy ...> clauses in each
config file, but, in each of these, only one thing changes.  It would be
much easier if I could use a variable in the AuthSelect lines.  The
variable could then be set from within the <Handler ...> clause.
	IE:
<Handler Realm=/^(abc.com|def.com|hij.com)$/, CHAP-Password=/.+/,
Client-Identifier=Blah >
	%variable1 = 'chapblah';
</Handler>
<AuthBy thishandler>
	AuthSelect select ENCRYPTPEDPASSOWRD, REALM from SUBSCRIBERS
	  where (USERNAME = '%U' and REALM = '%R' and ALLOW = '%variable1'
</AuthBy>
Note: Writing this email, I just realized that I might be able to do
this using the '%{Client:Identifier}' or '{Client:Name}' values in the
check.
Thoughts?
jp
-- 
   __________________________________________________________________
 /                                                                    \
|       James J. Pike Jr.         Phone: 888.747.4638                  |
|       Systems Engineer          Direct Phone: 517-664-8610           |
|       CoreComm Inc.             Http: http://www.core.com/           |
|                EMail: jay.pike at corecomm.com                          |
|         PGPKey: http://my.voyager.net/jaypike/pgpkey.txt             |
 \                                                                    /
   ------------------------------------------------------------------
===
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