Simultaneous-Use For Group Using Unlang

Det Det det.explorer at
Thu Nov 10 03:27:48 CET 2011


Where do I put this piece of code? Can I do this invocation in the authorize block? Or is it something I put in the radiusd.conf? And where do I put the custom procedure itself? Is it in /etc/freeradius/modules?

Sorry about this. I'm confused about the placement. First time to add a custom procedure. Possible to extend this example to show which codes go to which file?

Thanks a lot!

From: Alan DeKok <aland at>
To: FreeRadius users mailing list <freeradius-users at>
Sent: Wednesday, November 9, 2011 9:57 PM
Subject: Re: Simultaneous-Use For Group Using Unlang

det.explorer at wrote:
> I'd like to implement this using unlang but not sure where to start. The part that I am having difficulty is on where to create the procedure and how to call the procedure. The rest of the things like the DB query I can reuse from the existing program. I want to implement this using unlang to avoid having to open a new MySQL connection.
> Any example, I can follow?

  The SQL module supports string expansion.  The input strings are just
SQL statements.  The output is just a one-line string containing the
result of the SQL query.

  This means you can call SQL procedures directly from unlang:

    if ("%{sql: call procedure with args}" > 2) {
        ... more than 2 people logged in ..

  Very simple!

  Alan DeKok.
List info/subscribe/unsubscribe? See
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Freeradius-Users mailing list