update request noop
saturn
saturn at rudn-sochi.ru
Thu Jun 30 12:50:43 CEST 2016
Matthew Newton писал 30.06.2016 12:03:
> On Thu, Jun 30, 2016 at 08:54:36AM +0300, saturn wrote:
>> I try to change the username attribute in the request by the result of
>> sql
>> select query:
>> if ("%{sql_main:select count(id) from vbmacs where
>> mac='%{User-Name}'}" >
>> "0") {
>> update request {
>> User-Name = "%{sql_main:select phone from vbmacs where
>> mac='%{User-Name}'}"
>> }
>> }
>> else {
>> reject
>> }
>>
>> This code is placed in authorize section after module preprocess.
>>
>> But in debug I see "update request = noop" after successful expanding
>> of sql
>> query result.
>
> User-Name is already set, so User-Name = '...' won't overwrite it.
>
> Use :=
>
> Matthew
Thank you for help. It's working now.
More information about the Freeradius-Users
mailing list