Blank value of temporary variable in Unlang
Mrinal K
sinha.mrinal at gmail.com
Thu Nov 6 14:08:42 CET 2014
Hi Phil,
I am getting value from the first query
Heres my debug log, I have highlighted the required queries
# Executing section authorize from file
/etc/freeradius/sites-enabled/default
+- entering group authorize {...}
++[preprocess] returns ok
[chap] Setting 'Auth-Type := CHAP'
++[chap] returns ok
++[mschap] returns noop
++[digest] returns noop
[suffix] No '@' in User-Name = "14-F6-5A-F0-80-61-0000000010", looking up
realm NULL
[suffix] No such realm "NULL"
++[suffix] returns noop
[eap] No EAP-Message, not doing EAP
++[eap] returns noop
++[files] returns noop
[sql] expand: %{User-Name} -> 14-F6-5A-F0-80-61-0000000010
[sql] sql_set_user escaped user --> '14-F6-5A-F0-80-61-0000000010'
rlm_sql (sql): Reserving sql socket id: 4
[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 = '14-F6-5A-F0-80-61-0000000010' ORDER BY id
[sql] User found in radcheck table
[sql] expand: SELECT id, username, attribute, value, op FROM
radreply WHERE username = '%{SQL-User-Name}' ORDER BY
id -> SELECT id, username, attribute, value, op FROM radreply
WHERE username = '14-F6-5A-F0-80-61-0000000010' ORDER BY id
[sql] expand: SELECT groupname FROM radusergroup
WHERE username = '%{SQL-User-Name}' ORDER BY priority -> SELECT
groupname FROM radusergroup WHERE username =
'14-F6-5A-F0-80-61-0000000010' ORDER BY priority
rlm_sql (sql): Released sql socket id: 4
++[sql] returns ok
++[expiration] returns noop
++[logintime] returns noop
[pap] WARNING: Auth-Type already set. Not setting to PAP
++[pap] returns noop
sql_xlat
expand: %{User-Name} -> 14-F6-5A-F0-80-61-0000000010
sql_set_user escaped user --> '14-F6-5A-F0-80-61-0000000010'
expand: select id from radcheck where username='%{User-Name}'
order by id desc limit 1 -> select id from radcheck where
username='14-F6-5A-F0-80-61-0000000010' order by id desc limit 1
rlm_sql (sql): Reserving sql socket id: 3
sql_xlat finished
rlm_sql (sql): Released sql socket id: 3
* expand: %{sql: select id from radcheck where
username='%{User-Name}' order by id desc limit 1} -> 24*
++[control] returns noop
sql_xlat
expand: %{User-Name} -> 14-F6-5A-F0-80-61-0000000010
sql_set_user escaped user --> '14-F6-5A-F0-80-61-0000000010'
* expand: select ExpiryDate from radcheck where id =
'%{My-Local-Int-1}' -> select ExpiryDate from radcheck where id = ' '*
rlm_sql (sql): Reserving sql socket id: 2
SQL query did not return any results
rlm_sql (sql): Released sql socket id: 2
* expand: %{sql: select ExpiryDate from radcheck where id =
'%{My-Local-Int-1}'} -> *
++[reply] returns noop
Found Auth-Type = CHAP
# Executing group from file /etc/freeradius/sites-enabled/default
+- entering group CHAP {...}
[chap] login attempt by "14-F6-5A-F0-80-61-0000000010" with CHAP password
[chap] Using clear text password "14-F6-5A-F0-80-61-0000000010" for user
14-F6-5A-F0-80-61-0000000010 authentication.
[chap] chap user 14-F6-5A-F0-80-61-0000000010 authenticated succesfully
++[chap] returns ok
# Executing section post-auth from file
/etc/freeradius/sites-enabled/default
+- entering group post-auth {...}
[sql] expand: %{User-Name} -> 14-F6-5A-F0-80-61-0000000010
[sql] sql_set_user escaped user --> '14-F6-5A-F0-80-61-0000000010'
[sql] expand: %{User-Password} ->
[sql] ... expanding second conditional
[sql] expand: %{Chap-Password} -> 0x00d3c7d69aaad14438d01478ad05d2ad00
On Thu, Nov 6, 2014 at 6:07 PM, Phil Mayers <p.mayers at imperial.ac.uk> wrote:
> On 06/11/14 12:27, Mrinal K wrote:
>
> The username I am testing with has ExpiryDate value in radcheck table,
>> however mysql query log shows me blank value for '%{My-Local-Int-1}'
>> for query in update reply {.. } section.
>>
>
> Your SQL query returned no rows.
>
> Run "radiusd -X" and look at the debug. It will show you want is going on.
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/
> list/users.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20141106/ca151008/attachment.html>
More information about the Freeradius-Users
mailing list