Hello Cassidy -
At 16:42 -0700 01/1/25, Cassidy B. Larson wrote:
>Howdy all,
>
>I've got a question to ask..and I hope someone can help shed some light on
>the subject.
>
>We have a filtering service called 'X-Stop', that filters users depending on
>their class
>string.. One can customize the class attribute depending on what the user
>wants
>filtered..
>
>Here's the question, how can grab the custom string out of my database for
>the
>user, if they have the service enabled (column is xstop) ?? Here's a sample
>code that I have now of my AuthBy SQL statement..
>
>
><AuthBy SQL>
> DBSource dbi:mysql:authenticate:127.0.0.1
> DBUsername xxxxx
> DBAuth xxxxx
> AuthSelect select password, '' as CHECKATTR,
>if(xstop=1,'VPN-Neighbor = 216.190.28.36, Class = "xstop: Rule1"','Class=
>"IW.SGU-SUNSET"') as REPLYATTR from users where username='%n' and
>dialup_service!=-1 and dialup_service!=0
> EncryptedPassword 1
></AuthBy>
>
>As you can see there's a simple 'if' statement inside the select statement
>that sets the
>VPN-Neighbor to talk to the Filtering box directly.. and assigns the class
>..
>Question being, how do I select the class from the database, and return it
>as the
>Class attribute ???
>
>I've tried doing a 'AuthSelect select password,xstop_class, '' .... ' but
>that
>didn't seem to work right..
>
The best way to do this is with GENERIC check and reply attributes.
You would have a CHECKATTR field and a REPLYATTR field in your
database, with the check items in the CHECKATTR field and the reply
attributes in the REPLYATTR field. Both fields would contain the
attributes in the following form:
VPN-Neighbor=216.190.28.36, Class="xstop:Rule1", ....
and your configuration file would look like this:
AuthSelect select password, CHECKATTR, REPLYATTR \
from users where username='%n' \
and dialup_service!=-1 \
and dilaup_service!=0
AuthColumdDef 0, Password, check
AuthColumnDef 1, GENERIC, check
AuthColumnDef 2, GENERIC, reply
hth
Hugh
--
NB: I am travelling this week, so there may be delays in our correspondence.
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, Interbiller, TACACS+, PAM, external, etc, etc.
Available on Unix, Linux, FreeBSD, Windows 95/98/2000, NT, MacOS X.
===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.