rlm_sql_sybase

Marko Dinic marko at yu.net
Thu Jan 12 16:22:45 CET 2006



Hello,
I have set up sql accounting using rlm_sql_sybase driver. This is what the config
looks like:

sql {
        driver = "rlm_sql_sybase"

        # Connect info
        server = "SOMESERVER"   # server symbolic name defined in /opt/sybase/interfaces
        port = 5000             # port is defined in /opt/sybase/interfaces, so this is not neccessary

        login = "somelogin"
        password = "somepassword"

        # Database table configuration
        radius_db = "dialin"

        [...]
}

First, looking through the rlm_sql_sybase.c, I couldn't find the use of 
config->sql_db anywhere in the code, so whatever is set as radius_db in sql.conf
isn't used in the sybase driver. This means that table names in queries have to 
be defined as

  ${radius_db}..tablename

While this generally works fine, every time radiusd is started or HUPed, 
it generates error messages in radius.log that look like this:

Thu Jan 12 12:52:10 2006 : Error: Sybase Server message:
Thu Jan 12 12:52:10 2006 : Error: number(5701) severity(10) state(2) line(1)
Thu Jan 12 12:52:10 2006 : Error: Changed database context to 'master'.

These are repeated for each connection to the server.

I am in no way Sybase expert, but it seems to me that this happens because
the database we want to use is not set. I couldn't find any ctlib example code
in which the active database is explicitly chosen, so that I could perhaps produce
a patch. 

Does anybody have any solution to this ?

-- 
Best regards,

Marko Dinic, System Engineer
----- 
YUnet International  http://www.eunet.yu
Dubrovacka 35/III,   11000 Belgrade
Tel: +381 11 311 9901;  Fax: + 381 11 311 9901
-----
This  e-mail  is confidential and intended only for the recipient.
Unauthorized  distribution,  modification  or  disclosure  of  its
contents is prohibited. If you have received this e-mail in error,
please notify the sender by telephone  +381 11 311 9901.
-----



More information about the Freeradius-Users mailing list