[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnu-radius-bug
Subject:    Re: [Bug-gnu-radius] Core dump on sql config errors
From:       Sergey Poznyakoff <gray () Mirddin ! farlep ! net>
Date:       2003-11-25 12:09:58
[Download RAW message or body]

Maurice Makaay <Maurice.Makaay@internl.net> wrote:

> (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.

Thanks!

> 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.

Hmm, I believe providing defaults in such case is not correct. Radiusd
should emit a critical error message and abort. I'll implement it this
way.

Besides, there is a subtle detail:

> +	if (!cfg->port) {
> +		radlog(L_WARN,
> +		       _("SQL: missing parameter '%s', reverting to '%s'"),
> +		       "port", "3306");
> +		cfg->port = 3306;
> +	}

Port is optional. Omitting it is OK for any interface type.

Regards,
Sergey




_______________________________________________
Bug-gnu-radius mailing list
Bug-gnu-radius@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-gnu-radius
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic