On Jul 23, 2010, at 1:31 AM, Phil Mayers wrote:
On 07/22/2010 11:50 PM, Tom Leach wrote:
I'm currently using Freeradius v2.1.9 and I'm trying to write a condition in the authorize section to use a different module depending on whether Mac-auth or someother auth is being called. In reading the wiki (http://wiki.freeradius.org/Mac-Auth) it appears that I want to check (Chap-Password == hash(User-Name)) but I'm having a problem getting the unlang syntax correct.
So far, I've tried: if (Chap-Password == hash(User-Name)){ which fails with: Consecutive conditions at (User-Name)) /etc/raddb/sites-enabled/default[62]: Errors parsing authorize section.
AFAIK hash() or function calls in generall aren't a feature of unlang. Maybe the wiki page is listing pseudo-code?
The wiki is listing pseudo code. The examples below the pseudo code are in unlang... -Arran