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

This is a discussion on Re: SQL help from someone who groks c, please? within the FreeRADIUS Users forums, part of the Networking and Network Related category; Dan Mahoney, System Admin wrote: > > I assume you mean the core SQL module, and nothing driver specific, yes? ...


Go Back   Usenet Forums > Networking and Network Related > FreeRADIUS Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-05-2007
Phil Mayers
 
Posts: n/a
Default Re: SQL help from someone who groks c, please?

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 edification of anyone who might stumble on this, the CVS
> code relevant to which version? I.e. would this be a 2.x branch thing?


Sorry my bad - should have been more precise. The code I am looking at
is a checkout of HEAD. I'm not familiar with the dev/release plans for
2.0 - hopefully one of the devs will chip in here.

> advanced examples if need be. The concept of group ownership is still
> good, but with SQL working the way you describe, and fall-through working
> right, it's not strictly as necessary as it was: in theory it's possible
> with the new code to select ALL rows, and read the whole table just like
> an old-style users-file, no (waste of processor and resources aside).


Very good point - removing the "where username=" bit from the group
membership query would return each group in turn (ordered by precedence).

>
>> ...with appropriate check/reply items (e.g. check item might be
>> huntgroup or nas-ip-address). The groups would contain one user - in the
>> previous example, jeremy.

>
> Okay -- do you know anything about if the semicolon is intentionally
> ignored? I tried doing multiple queries in a single statement but got an
> error (thank god for UNION).


I hazily recall a discussion w.r.t. MySQL and (I think) the
SQL_MULTI_STATEMENT option not being on in the driver, but here we reach
the limit of my knowledge. As far as I can tell from the source, rlm_sql
just passes the xlat'ed string to the driver, so any handling of lack
therefore of multiple statements would be in there.

>
> -Dan
>
> --
>
> --------Dan Mahoney--------
> Techie, Sysadmin, WebGeek
> Gushi on efnet/undernet IRC
> ICQ: 13735144 AIM: LarpGM
> Site: http://www.gushi.org
> ---------------------------
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:36 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0