sql insert via unlang
Arran Cudbard-Bell
A.Cudbard-Bell at sussex.ac.uk
Wed Jan 28 14:34:33 CET 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alan DeKok wrote:
> 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
> }
>
No.
Look at the code, only SELECT is available for xlat'd queries...
Arran
- --
Arran Cudbard-Bell (A.Cudbard-Bell at sussex.ac.uk),
Authentication, Authorisation and Accounting Officer,
Infrastructure Services (IT Services),
E1-1-08, Engineering 1, University Of Sussex, Brighton, BN1 9QT
DDI+FAX: +44 1273 873900 | INT: 3900
GPG: 86FF A285 1AA1 EE40 D228 7C2E 71A9 25BB 1E68 54A2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkmAXukACgkQcaklux5oVKJaGACfY3O42M9nHvvWHPaYqQkI58vZ
ijIAnRxjVNiR+VSB5BwT6TxKlJ2BjjP5
=OCFr
-----END PGP SIGNATURE-----
More information about the Freeradius-Users
mailing list