rlm_exec does not change already existing attributes

Dmitry Lyubimkov loft at onego.ru
Mon Apr 24 12:23:26 CEST 2006


In the rlm_exec module for change of attributes according to result of
script it is used 

	if (output_pairs) pairmove(output_pairs, &answer);

in function

	static int exec_dispatch(void *instance, REQUEST *request)

But function pairmove in valuepair.c does only the following

/* 
 *      Move attributes from one list to the other 
 *      if not already present. 
 */ 
void pairmove(VALUE_PAIR **to, VALUE_PAIR **from) 

I.e. if such attribute does not exist that it will be added, and if
already exists, will take place nothing.
As result using an external script we can only add new attributes, but
we can not change existing attributes!
How to change User-Name in Radius request?
Is it possible to change existing attributes in the simple way without
change of the module rlm_exec code?

Dmitry






More information about the Freeradius-Users mailing list