update request noop

Matthew Newton mcn4 at leicester.ac.uk
Thu Jun 30 11:03:11 CEST 2016


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


-- 
Matthew Newton, Ph.D. <mcn4 at leicester.ac.uk>

Systems Specialist, Infrastructure Services,
I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom

For IT help contact helpdesk extn. 2253, <ithelp at le.ac.uk>


More information about the Freeradius-Users mailing list