sql module behavior differs from 2.2.1 to 3.0.0 ?

Arran Cudbard-Bell a.cudbardb at freeradius.org
Wed Oct 23 14:12:21 CEST 2013


> (2) sql :       expand: "%{User-Name}" -> '002324609e3f'
> (2) sql : SQL-User-Name set to "002324609e3f"
> rlm_sql (sql): Reserved connection (4)
> (2) sql :       expand: "SELECT id, username, attribute, value, op FROM radcheck WHERE username = '%{SQL-User-Name}' ORDER BY id" -> 'SELECT id, username, attribute, value, op FROM radcheck WHERE
> username = '002324609E3F' ORDER BY id'
> rlm_sql (sql): Executing query: 'SELECT id, username, attribute, value, op FROM radcheck WHERE username = '002324609E3F' ORDER BY id'
> (2) sql :       expand: "SELECT groupname FROM radusergroup WHERE username = '%{SQL-User-Name}' ORDER BY priority" -> 'SELECT groupname FROM radusergroup WHERE username = '002324609E3F' ORDER BY
> priority'
> rlm_sql (sql): Executing query: 'SELECT groupname FROM radusergroup WHERE username = '002324609E3F' ORDER BY priority'
> rlm_sql (sql): Released connection (4)
> (2)   [sql] = noop

It’s consistent with the users file, which also returns noop if not entries match. 

Things like rlm_ldap are different because you’re looking for a specific object in the directory, so it’s ok to return notfound.

I guess both rlm_files and rlm_sql could return notfound if no key matched, and noop if no entry matched. Do people think this would be a useful distinction?

Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS Development Team



More information about the Freeradius-Users mailing list