plpgsql freeradius authentication function
Kafui Akyea
kakyea at gmail.com
Sat Oct 16 17:49:36 CEST 2010
Hi
I have a plpgsql function being called from freeradius to do authentication
but i keep getting
Access-Reject from radius although when i run the function without
freeradius it works fine.
Please find below the function and how i call it
CREATE OR REPLACE FUNCTION try (your_name TEXT, tiger TEXT) RETURNS RECORD
AS $$
DECLARE
users_rec RECORD;
BEGIN
if tiger = '0000' then
SELECT INTO users_rec * FROM aniradcheck WHERE username = your_name;
else
SELECT INTO users_rec * FROM radcheck WHERE username = your_name;
end if;
RETURN users_rec.username;
END;
$$ LANGUAGE plpgsql;
SELECT id,username,attribute,op,value FROM try('7140944444','0000') as(id
integer,username varchar,attribute varchar,op character,value varchar);
Appreciate if you can help
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20101016/4e1e9c2c/attachment.html>
More information about the Freeradius-Users
mailing list