In my radius config file I have:

        <Client DEFAULT>
                .
                .
                PreHandlerHook file:"/etc/raddb/prehandler.radhook"
        </Client>


In /etc/raddb/prehandler.radhook I have:

        .
        .
        $p->add_attr('CCC-DB',"testdb");
        .


For my SessionDB I try to reference my %{CCC-DB} variable:

        <SessionDatabase SQL>
        Identifier      SDB
        DBSource        dbi:mysql:%{CCC-DB}:db1.domain.com
        .
        .

But it appears I can't reference it as it comes up with an error:

Wed Aug 20 19:28:01 2003: ERR: do failed for 'delete from RADONLINE where
NASIDENTIFIER='203.63.154.1' and NASPORT=01234': No Database Selected

So I'm assuming that you can only reference certain %{attr} in certain
cases.  I want to be able to use the same sessionDB "template" and have it
reference different databases as determined by the PreHandlerHook.  I
don't want to build 50 different <SessionDatabase ...> statements for all
of our customers (since they all have different DBs).  How can I
accomplish this?

Same problem exists for <AuthBy SQL> DBSource directives.  I want the
Prehandler to choose the database to connect to.  Any pointers?

Thanks,

Nick Rogness

===
Archive at http://www.open.com.au/archives/radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to