Mysql procedure and freeradius

Alan Lumb freeradius at siblin.co.uk
Wed Aug 9 11:08:45 CEST 2006


ensure the user has Process_priv.

Also there is the security_type flag in the mysql.proc table which defines
who the proceedure runs as (invoker or definer)

Its all quite well documented on the mysql website.


> Hi All.
> I have the trouble with mysql & freeradius.I begin to write own
> authorization
> using mysql procedures.In sql.conf i have this
> ---
> authorize_check_query = "CALL DB.auth_check('%{SQL-User-Name}');"
> --
> And in DB have procedure auth_check with this code:
> ---
> CREATE TEMPORARY TABLE DB.make_auth (id int,username VARCHAR(40),attribute
> VARCHAR(30),op VARCHAR(3),value VARCHAR(40)) ENGINE MEMORY;
> ....certain checks...
> INSERT INTO DB.make_auth (id,username,attribute,op,value) VALUES
> (dbUID,username,"User-Password",":=",dbPassword);
> SELECT id,username,attribute,op,value FROM DB.make_auth;
> --
> So..this procedure when i call her from CLI return table like this
> +------+----------+---------------+------+--------+
> | id   | username | attribute     | op   | value  |
> +------+----------+---------------+------+--------+
> |    1 | username   | User-Password | :=   | password |
> +------+----------+---------------+------+--------+
> Look good..but when I'm trying to use radtest  and radius -X i'm getting
> this:
> ----
> radius_xlat:  'username'
> rlm_sql (sqlauth): sql_set_user escaped user --> 'username'
> radius_xlat:  'CALL DB.auth_check('username');'
> rlm_sql (sqlauth): Reserving sql socket id: 28
> rlm_sql_mysql: query:  CALL DB.auth_check('username');
> rlm_sql_mysql: MYSQL check_error: 1312 received
> rlm_sql_getvpdata: database query error
> rlm_sql (sqlauth): SQL query error; rejecting user
> rlm_sql (sqlauth): Released sql socket id: 28
> ---
> What's wrong???
> P.S.Sorry for my english)))
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>





More information about the Freeradius-Users mailing list