Re: SQL help from someone who groks c, please?

2007-02-08 Thread ChristosH
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

Re: SQL help from someone who groks c, please?

2007-02-08 Thread Dan Mahoney, System Admin
On Thu, 8 Feb 2007, ChristosH wrote: No, wrong. You can include any %{check-item} in your query. I didn't have to modify the code at all, but my queries are PERVERSE. Yours will probably be simpler. If you want to give me your proposed database setup and schema, and what you need to auth

Re: SQL help from someone who groks c, please?

2007-02-08 Thread Dan Mahoney, System Admin
On Thu, 8 Feb 2007, ChristosH wrote: Phil Mayers wrote: A stored procedure is one solution to a particular set of problems. Whether it's appropriate depends on what you're trying to do. What do you want to achieve? You can certainly vary the reply info based on NAS without a stored

Re: SQL help from someone who groks c, please?

2007-02-05 Thread Phil Mayers
Dan Mahoney, System Admin wrote: I assume you mean the core SQL module, and nothing driver specific, yes? Yep. The relevant code is in rlm_sql.c so it's driver-independent. However, in the CVS version of FreeRadius, the SQL code works much more like you'd expect: Also, for the

Re: SQL help from someone who groks c, please?

2007-02-05 Thread Peter Nixon
On Mon 05 Feb 2007 10:56, Phil Mayers wrote: Dan Mahoney, System Admin wrote: I assume you mean the core SQL module, and nothing driver specific, yes? Yep. The relevant code is in rlm_sql.c so it's driver-independent. However, in the CVS version of FreeRadius, the SQL code works much more

SQL help from someone who groks c, please?

2007-02-04 Thread Dan Mahoney, System Admin
Hey all... Disclaimer: If I should ask this on the devel list, let me know and I will. As I'm not qualified in the languages to be a developer, this seemed the more logical place. I'm decent with Radius but have just come to freeradius over Cistron...I'm still in the process of assimilating

Re: SQL help from someone who groks c, please?

2007-02-04 Thread Dan Mahoney, System Admin
On Mon, 5 Feb 2007, Phil Mayers wrote: Dan Mahoney, System Admin wrote: That said, I figured out two possible ways to handle my previous question regarding advanced SQL auth (including multiple occurances of the same Minor point of terminology - SQL doesn't authenticate. It acts as a store