Re: How to execute TWO OR MORE Sql statement?

2006-07-27 Thread Alan DeKok
Duane Cox [EMAIL PROTECTED] wrote:
 Wouldn't it be possible to have freeradius call different sql sections
 depending on other attributes.

  Yes.

 But I get this error... Failed to link to module 'rlm_sql1': rlm_sql1.so:
 cannot open shared object file: No such file or directory

  See the examples in doc/configurable_failover for naming schemes
when using multiple copies of a module.

  Alan DeKok.
--
  http://deployingradius.com   - The web site of the book
  http://deployingradius.com/blog/ - The blog
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: How to execute TWO OR MORE Sql statement?

2006-07-26 Thread Alan Lumb

 Create a stored procedure in the database that contains all of the SQL
 queries necessary. Then call that stored procedure via sql.conf. This
 works fine with Postgres.

MySQL 5 supports stored proceedures and functions, however I know that
mysql proceedures can cause problems as they can/will return multiple data
sets that can cause some apps problems (not sure about freeradius and its
support for mysql).

I gave up on such a method and moved to rlm_perl.  Now I have a perl
handling script that performs as many queries as I need and can put lots
of logic in the script, strip bits out of usernames and whatnot.  Also it
can look for certain flags in the database and if present send AV Pairs or
VSA's to the NAS to configure them differently.

my only issue has been getting rlm_perl to compile properly on suse
x86_64, and sometimes have had to goto the extreme of recompiling perl and
manually linking DynaLoader into rlm_perl.so

So in answer to the original question I recommend rlm_perl if you have the
time and patience to get around the setup problems.


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


RE: How to execute TWO OR MORE Sql statement?

2006-07-26 Thread Jurgen van Vliet
Im using stored procs to do a series of queries even with IF THEN ELSE
structires, with variables being the result of a query and being used in
other queries.
Works like a charm for me with mysql5 and freeradius 1.1.2

In the sql.conf I just use as query something like call
storedproc1(var1,var2,var3)

Regards,

Jurgen
-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Namens Alan Lumb
Verzonden: woensdag 26 juli 2006 14:08
Aan: FreeRadius users mailing list
Onderwerp: Re: How to execute TWO OR MORE Sql statement?


 Create a stored procedure in the database that contains all of the SQL 
 queries necessary. Then call that stored procedure via sql.conf. This 
 works fine with Postgres.

MySQL 5 supports stored proceedures and functions, however I know that mysql
proceedures can cause problems as they can/will return multiple data sets
that can cause some apps problems (not sure about freeradius and its support
for mysql).

I gave up on such a method and moved to rlm_perl.  Now I have a perl
handling script that performs as many queries as I need and can put lots of
logic in the script, strip bits out of usernames and whatnot.  Also it can
look for certain flags in the database and if present send AV Pairs or VSA's
to the NAS to configure them differently.

my only issue has been getting rlm_perl to compile properly on suse x86_64,
and sometimes have had to goto the extreme of recompiling perl and manually
linking DynaLoader into rlm_perl.so

So in answer to the original question I recommend rlm_perl if you have the
time and patience to get around the setup problems.


-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


How to execute TWO OR MORE Sql statement?

2006-07-25 Thread 王世彦
Oh, my have another question about Freeradius.

I see when the Freeradius receives whatever a request, Freeradius will
execute ONE SQL statement which is defined in the sql.conf.

My question is how to make Freeradius to execute TOW OR MORE SQL statement
when Freeradius receives a request.

I am new to Freeradius and apologize for asking simple question.

-Original Message-
From: Stefan Winter [mailto:[EMAIL PROTECTED] 
Sent: 2006年7月26日 1:03
To: FreeRadius users mailing list
Subject: Re: How to reply Session-Timeout without password

Hi,

 My question is how to make the radius server accept the request which do
 not contain the password and reply the Session-Timeout to the *b2bua?

I have not the faintest idea about *b2bua (WTF?) but if you just want to 
accept everyone without any checks for your *b2bua NASes, you can achieve it

in the users file with

NAS-IP-Address == your-b2bua-ns, Auth-Type := Accept
Session-Timeout := whatever

Do keep in mind that everyone who is authenticating via this IP address is 
*always* *accepted*

Greetings,

Stefan Winter

-- 
Stefan WINTER

Fondation RESTENA - Réseau Téléinformatique de l'Education Nationale et
de 
la Recherche - Ingénieur de recherche

6, rue Richard Coudenhove-Kalergi
L-1359 Luxembourg





- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: How to execute TWO OR MORE Sql statement?

2006-07-25 Thread Dan O'Neill
王世彦 wrote:
 Oh, my have another question about Freeradius.
 
 I see when the Freeradius receives whatever a request, Freeradius will
 execute ONE SQL statement which is defined in the sql.conf.
 
 My question is how to make Freeradius to execute TOW OR MORE SQL statement
 when Freeradius receives a request.
 
 I am new to Freeradius and apologize for asking simple question.

Create a stored procedure in the database that contains all of the SQL
queries necessary. Then call that stored procedure via sql.conf. This
works fine with Postgres.

Dan

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html