RE: custom variable in config files

2005-09-15 Thread Tariq Rashid


i'm running into the same problem again in the clients.conf file where 
variables are not visible in the host = entries.

i'd like to do something like ...

realm abc.def {
type= radius
authhost= `%{config:network_address}`.126:1812
accthost= `%{config:network_address}`.126:1813
secret  = llustreamkey
nostrip
}  

where network_address is defined in a file included in radius.cfg (which works 
for the users file shown below).

any ideas? can i force the clients.conf to be xlat'ed?

tariq


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
Nicolas Baradakis
Sent: 13 September 2005 18:08
To: FreeRadius users mailing list
Subject: Re: custom variable in config files


Tariq Rashid wrote:

 but this doesn't ...
 
   # local test user for monitoring and diagnostics
   [EMAIL PROTECTED]:easynet_site} User-Password == 
 test1.proxyradius.%{config:easynet_site}
   Reply-Message = hello from the proxyradius layer 
 %{config:easynet_site}
 
 any ideas? i'm using version 1.0.2 on debian 3.1

It doesn't work because the name of the entry isn't xlat'ed in
src/main/files.c. Perhaps this syntax would work:

DEFAULT User-Name = [EMAIL PROTECTED]:easynet_site}, User-Password == 
test1.proxyradius.%{config:easynet_site}
Reply-Message = hello from the proxyradius layer 
%{config:easynet_site}

-- 
Nicolas Baradakis
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: custom variable in config files

2005-09-15 Thread Alan DeKok
Tariq Rashid [EMAIL PROTECTED] wrote:
 i'd like to do something like ...
 
   realm abc.def {
   type= radius
   authhost= `%{config:network_address}`.126:1812

  The expansion of configuration-file variables is not the same as the
expansion of run-time variables.  See other examples in the
configuration.

  What *could* work is:

  authhost = ${network_address}.126:1812

  Alan DeKok.
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


RE: custom variable in config files

2005-09-15 Thread Tariq Rashid


thanks for the suggestion and clarification. trying what you suggested gives me 
...

Config:   including file: /opt/freeradius102/etc/raddb/proxy.conf
config: No such entry network_address for string 
${network_address}.126:1812
Errors reading radiusd.conf

i'll keep trying and report back anything that works.

tariq


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Alan
DeKok
Sent: 15 September 2005 17:18
To: FreeRadius users mailing list
Subject: Re: custom variable in config files 


Tariq Rashid [EMAIL PROTECTED] wrote:
 i'd like to do something like ...
 
   realm abc.def {
   type= radius
   authhost= `%{config:network_address}`.126:1812

  The expansion of configuration-file variables is not the same as the
expansion of run-time variables.  See other examples in the
configuration.

  What *could* work is:

  authhost = ${network_address}.126:1812

  Alan DeKok.
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: custom variable in config files

2005-09-15 Thread Alan DeKok
Tariq Rashid [EMAIL PROTECTED] wrote:
 thanks for the suggestion and clarification. trying what you suggested gives 
 me ...
 
   Config:   including file: /opt/freeradius102/etc/raddb/proxy.conf
   config: No such entry network_address for string 
 ${network_address}.126:1812
   Errors reading radiusd.conf

  Ah... I ran into that the other day.  Expanding configuration
variables in $INCLUDE'd files may not work, and I'm not sure why.
It's a bug.

  Alan deKok.

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


RE: custom variable in config files

2005-09-14 Thread Tariq Rashid

thanks - that works - i can confirm that for the list 

tariq


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
Nicolas Baradakis
Sent: 13 September 2005 18:08
To: FreeRadius users mailing list
Subject: Re: custom variable in config files


Tariq Rashid wrote:

 but this doesn't ...
 
   # local test user for monitoring and diagnostics
   [EMAIL PROTECTED]:easynet_site} User-Password == 
 test1.proxyradius.%{config:easynet_site}
   Reply-Message = hello from the proxyradius layer 
 %{config:easynet_site}
 
 any ideas? i'm using version 1.0.2 on debian 3.1

It doesn't work because the name of the entry isn't xlat'ed in
src/main/files.c. Perhaps this syntax would work:

DEFAULT User-Name = [EMAIL PROTECTED]:easynet_site}, User-Password == 
test1.proxyradius.%{config:easynet_site}
Reply-Message = hello from the proxyradius layer 
%{config:easynet_site}

-- 
Nicolas Baradakis
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


RE: custom variable in config files

2005-09-13 Thread Tariq Rashid


ok - i've worked out how to do this wityh {config:var_name} where var_name can 
be declared in radiusd.conf or an included file.

the %{config:var_name} can be used in a users file easily - in the reply 
attibutes, in the password condition test too .. but not in the user name...

so this works ... 

# local test user for monitoring and diagnostics
[EMAIL PROTECTED] User-Password == 
test1.proxyradius.%{config:easynet_site}
Reply-Message = hello from the proxyradius layer 
%{config:easynet_site}

but this doesn't ...

# local test user for monitoring and diagnostics
[EMAIL PROTECTED]:easynet_site} User-Password == 
test1.proxyradius.%{config:easynet_site}
Reply-Message = hello from the proxyradius layer 
%{config:easynet_site}


any ideas? i'm using version 1.0.2 on debian 3.1

tariq rashid



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Tariq
Rashid
Sent: 13 September 2005 16:10
To: FreeRadius users mailing list
Subject: custom variable in config files



hi - is it possible for me to declare a variable in one inlcuded config file, 
which is then visible in all the config files?

in order to keep the config file as simple as possible, i want to take out the 
site/server dependent portion into a variable. so at each different site/server 
i would have an included file with a variable location=london or 
location=paris and then this is visible in all other config files eg

users:
[EMAIL PROTECTED]  etc

clients.conf
shortname = abc.def.${location}

is this possible?

tariq

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html