[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnu-radius] Core dump on sql config errors
From: |
Maurice Makaay |
Subject: |
[Bug-gnu-radius] Core dump on sql config errors |
Date: |
Tue, 4 Nov 2003 10:13:34 +0100 |
Hi,
If certain keywords are omitted from the sqlserver configuration, the
server will crash with SEGFAULT on startup. E.g. if acct_db is not set
(even if do_acct is set to false) the server will crash. In the case
sql debugging is enabled, the server will trip over the statement
debug(1, ("SQL init using: %s:%d,%s,%s,%s,%d,%ld,%d,%d",....) in
sql_check_config() which will try to print out NULL values.
In the attached patch, the sql_check_config() is extended to have
better checking of the sql configuration and to provide defaults for
variables which are not set in the sqlserver config file. Each missing
parameter will be logged at the L_WARN loglevel. The setting of default
values could be done at the start of rad_sql_init(), but I think it's
better to do it in sql_check_config(), so warning messages can be
spawned to the user.
Regards,
-- Maurice Makaay
patch.config.sql
Description: Text document
- [Bug-gnu-radius] Core dump on sql config errors,
Maurice Makaay <=