2.0.0 Depracated conditional expansion :-

2007-06-27 Thread Hugh Messenger
The default mysql-dialup.conf queries are generating a lot of these
warnings:

WARNING: Deprecated conditional expansion :-.  See man unlang for
details
expand: INSERT INTO radpostauth (id, user, pass, reply, date)
VALUES ('', '%{User-Name}', '%{User-Password:-Chap-Password}',
'%{reply:Packet-Type}', '%S') - INSERT INTO radpostauth (id, user, pass,
reply, date)   VALUES ('', 'radiustest', 'test123',
'Access-Accept', '2007-06-27 13:34:51')

I'm assuming the warning is telling me that things like
'%{User-Password:-Chap-Password}' should now be
'%{%{User-Password}:-%{Chap-Password}}', as per 'man unlang':

Conditional Syntax
Conditional syntax similar to that used in Unix shells may also
be used.

%{%{Foo}:-bar}
   If %{Foo} has a value, returns that value.
   Otherwise, returns literal string bar.

%{%{Foo}:-%{Bar}}
   If %{Foo} has a value, returns that value.
   Otherwise, returns the expansion of %{Bar}.

This is the same for every conditional variable in the mysql-dialup.conf
file, of which there are quite a few.  If they do need changing, I'll be
quite happy to do that and send you a fixed file.

   -- hugh


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


Re: 2.0.0 Depracated conditional expansion :-

2007-06-27 Thread Alan DeKok
Hugh Messenger wrote:
...
 I'm assuming the warning is telling me that things like
 '%{User-Password:-Chap-Password}' should now be
 '%{%{User-Password}:-%{Chap-Password}}', as per 'man unlang':

  Yes.  *All* of the sample config files need to be fixed for this.

  The benefit is that this now works:

%{%{sql: SELECT }:-%{sql2:SELECT ...}}

  In 1.x, it didn't.

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