Updating/overwriting attribute with rlm_python

Alan DeKok aland at deployingradius.com
Thu Oct 26 22:29:05 UTC 2023


On Oct 26, 2023, at 4:52 PM, Norman Elton <normelton at gmail.com> wrote:
> 
> I’m using rlm_python, returning a tuple to update attributes in the reply.
> I’ve noticed that if the request already has a value for that attribute, it
> is not overwritten. That is, my operation becomes a no-op.
> 
> I suppose this matches the behavior of the “=“ operator. Is there a way to
> behave like the “:=“ operator, overwriting the existing value? Or should I
> strip the value prior to invoking my python module?

  You can pass a 3-tuple:  (name, operator, value)

  The operator works just like in the "files" module.

  Alan DeKok.



More information about the Freeradius-Users mailing list