segfault in presufcmp()

Alan DeKok aland at deployingradius.com
Sun Nov 22 16:49:10 CET 2009


Jakob Hirsch wrote:
> comparing Suffix or Prefix without it being set lets the server crash
> (see backtrace below). This is easily reproducable with this:
> 
> 
> authorize {
> 	# also happens with Prefix
> 	if (Suffix == "blub") {
> 	}
> ...

  Fixed, thanks.

> Besides that, I'm surprised that there is special handling for Prefix
> and Suffix. I thought they are just some attributes I can use as I wish.

  No.  They have specific meaning inside of the "hints" file.  Don't use
them for anything other than that.

> I parse User-Name with a regex and set them accordingly with %{1} etc.

  Don't do that.  They have pre-existing definitions.

  I've updated the to check for this case: setting values of virtual
attributes.  It now complains in debugging mode.

  Alan DeKok.



More information about the Freeradius-Devel mailing list