users file and "!*" comparisons
A.Cudbard-Bell at sussex.ac.uk
Tue Aug 7 19:08:58 CEST 2007
Daniel Larsson wrote:
> I've encountered an unintuitive behaviour in the users file processing .
> I wanted to do something similar to:
> DEFAULT Some-Attr !* "", Other-Attr !* ""
> I.e. if neither "Some-Attr" nor "Other-Attr" is present, it should
> However, this doesn't work, as paircmp in valuepair.c immediately
> returns the result as soon as an operator "!*" is found in the check
> list. No other check items in the user entry is checked. This seems to
> apply to both 1.1 and 2.0 branches.
> Before I try to patch this, is this intended for some reason?
In the users file, the top line conditions are evaluated in sequence
until one evaluates to false.
It doesn't matter which operators you use.
I actually find it quite helpful, and *more* intuitive that way, also
saves on processing for a line which could never match ...
Really if you want to be doing anything complicated with conditions I
would try the CVS head and look at 'man unlang'.
Arran Cudbard-Bell (A.Cudbard-Bell at sussex.ac.uk)
Authentication, Authorisation and Accounting Officer
Infrastructure Services | ENG1 E1-1-08
University Of Sussex, Brighton
EXT:01273 873900 | INT: 3900
More information about the Freeradius-Devel