sql module behavior differs from 2.2.1 to 3.0.0 ?

Philippe MARASSE philippe.marasse at ch-poitiers.fr
Wed Oct 23 13:35:03 CEST 2013


     Hello,

     I'm upgrading my freeradius servers from 2.2.1 to 3.0.0 with complete review of the 
configuration files. We're using MySQL backend to store freeradius datas.

     It seems that sql module return code is different when the user is not found in 
database :
       - Freeradius 2.2.1 returns "notfound", which is fine
       - Freeradius 3.0.0 returns "noop", which I did not expect !

     Is the new behavior normal ?

Relevant parts of debug log :

FR 2.2.1 :

[sql]   expand: %{User-Name} -> 002324609e3f
[sql] sql_set_user escaped user --> '002324609e3f'
rlm_sql (sql): Reserving sql socket id: 0
[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_mysql: query:  SELECT id, username, attribute, value, op           FROM 
radcheck           WHERE username = '002324609e3f'           ORDER BY id
[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_mysql: query:  SELECT groupname           FROM radusergroup           WHERE 
username = '002324609e3f' ORDER BY priority
rlm_sql (sql): Released sql socket id: 0
[sql] User 002324609e3f not found
++[sql] returns notfound

FR 3.0.0 :

(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

Rgds.

-- 
Philippe MARASSE

Pôle Infrastructures - Direction du Système d'Informations et de l'Organisation
Centre Hospitalier Henri Laborit
CS 10587 - 370 avenue Jacques Coeur
86021 Poitiers Cedex
Tel : 05.49.44.57.19


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4539 bytes
Desc: Signature cryptographique S/MIME
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20131023/3fd5e60e/attachment.bin>


More information about the Freeradius-Users mailing list