SQL help from someone who groks c, please?

ChristosH christov at aztecamobile.com
Thu Feb 8 18:58:08 CET 2007

Phil Mayers wrote:
> Dan Mahoney, System Admin wrote:
> My suggestion is that you use a custom schema and queries for your 
> database - probably a stored procedure. Pass the NAS-IP-Address into 
> these queries, and return different values based on the nas. Effectively 
> you move the code that walks over the request and chooses the right 
> values into the SQL server.

So if I was looking to select a different response based on NAS what I
should be doing is creating a stored procedure that ends up authenticating
for me? I don't quite see where this would fit in with the rlm_sql logic. 
Would that go in the sql.conf file? For using a new schema, would that mean
instead adding an extra column in the radcheck table and the response table
to associate with the NAS IP?

Would it be easier to create a function that inserts a prefex to the user
name then processes the SQL as normal? The only issue I see with this is
doubling the amount of users and user responses in the database .

Either way, I think i'm going to have to modify the rlm_sql.c file and then
having to recompile FreeRadius after I'm done editing it?
View this message in context: http://www.nabble.com/SQL-help-from-someone-who-groks-c%2C-please--tf3172009.html#a8870617
Sent from the FreeRadius - User mailing list archive at Nabble.com.

More information about the Freeradius-Users mailing list