Config file varable substitution.

Guy Fraser guy at incentre.net
Sat Mar 18 01:20:54 CET 2006


This message took a long time to show up.

I have satisfactorily designed a PHP4 program that recursively 
reads all the information from radiusd.conf and all included 
files.

I can now create an array with any necessary information 
including the name of the file and associated line number.
The only trick I have yet to do is track the number of lines 
in a multi line assignment, but that should only take a few 
minutes.

Now I just need to know the answers to my previous post to 
finish the collection function.

Monday I will start a function to read the users file.

Have a great weekend.

On Fri, 2006-17-03 at 12:03 -0700, Guy Fraser wrote:
> I am working on a program to read the config files.
> 
> I have now got it doing pretty much what I want, but need a little 
> more information that is provided in the docs and config files.
> 
> >From the man page on radiusd.conf I found that variables can be named :
> 
> ${section.subsection.name}
> 
> I have tentatively made an assumption that named instances use the 
> instance name rather than the section or subsection.
> 
> Please check the examples below and let me know if my assumptions 
> were correct.
> 
> Thanks in advance.
> 
> Examples:
> 
> Global		[checkrad] => /usr/local/sbin/checkrad
> 
> checkrad = ${sbindir}/checkrad
> 
> 
> Section		[security.max_attributes] => 200
> 
> security {
>         max_attributes = 200
> ...
> }
> 
> 
> Subsection	[modules.ldap.net_timeout] => 1
> 
> modules {
> ...
>         ldap {
> ...
>                 net_timeout = 1
>         }
> ...
> }
> 
> 
> Instance	[modules.IPASS.format] => prefix
> 
> modules {
> ...
>         realm IPASS {
>                 format = prefix
> ...
>         }
> ...
> }
> ] => prefix
> 
> - 
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
> 
-- 
Guy Fraser
Network Administrator
The Internet Centre
1-888-450-6787
(780)450-6787




More information about the Freeradius-Devel mailing list