On Tue, Oct 02, 2001 at 10:14:18AM +0100, Sergey V. Sichevsky wrote:
> >> rlm_sql: Pairs do not match [test]
> >>
> NPR> You must wrote 'Simultaneous-Use = 1' into radreply (radgroupreply) also.
> 
> Ok. I did as you say. But the result was same. :(

Simultanous-Use and Login-Time does not work with rlm_sql modules
without a minor change in source code.

The problem is, rlm_sql does not understand the check operators
other than '='.  If you use the "users" file (rlm_files), you
would use ':=' for Simultaneous-Use and Login-Time.  This hasn't
been implemented yet.  Someone sent a patch to the developers
list, I guess it'll get incorporated after some time.

Until then, take these lines:

        if ((strncasecmp(row[2], "Login-Time", 10) == 0) ||
            (strncasecmp(row[2], "Simultaneous-Use", 16) == 0))
                operator = T_OP_ADD;
        else
                operator = T_OP_CMP_EQ;


And add them before

        pair = pairmake(row[2], row[3], operator);
        pairadd(first_pair, pair);

in src/modules/rlm_sql/sql.c in function sql_userparse.


-- 
Mojahed
System Administrator
Agni Systems Limited

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

Reply via email to