sql insert via unlang

Alan DeKok aland at deployingradius.com
Fri Jun 20 07:54:53 CEST 2008


Flamur Rogova wrote:
> in my authorize section, I have this,
> ...
> check_password
> if(notfound) {
>     # log notfound to sql, the line below gives error...
>     "%{sql: INSERT INTO test.logs SET test.logs.user='%{User-Name}',
> test.description='user not found' }"

  You cannot put strings into the configuration like that.

> man unlang says it is possible to obtain results from db, but I need to
> execute only sql INSERT,
> is my syntax wrong ?

  Yes.  Nothing in the documentation says that this will work.

  You can do:

  if ("%{sql:INSERT ..."") {
	ok
  }

  Alan DeKok.



More information about the Freeradius-Users mailing list