Hello, this is my first message on that list.
I just compiled freeradius-snapshot-20030324 on sparc-solaris9

Before to really install thing, I'm used to test applications in a
specific directory. I mean that I configured that way :

./configure --prefix= --exec-prefix=/usr --libdir=/usr/lib/radius \
--mandir=/usr/share/man --with-logdir=/var/adm --datadir=/usr/share \
--with-radacctdir=/var/adm/radacct --disable-static \
--without-snmp

And then, I install using :
gmake R=/usr/local/TESTRADIUS install

and modified one or two configurations files.

Everything is working in debug mode (radiusd -X).
but it coredumps in 'normal mode'.

I traced the execution a bit, and found something strange with
the radlog() function.

As far as I understand your code, here is what happens

mainconfig:47                   struct main_config_t mainconfig;
radiusd:93                      radlog_dest_t radlog_dest = RADLOG_FILES;
radiusd.main:302                memset(&mainconfig, 0, sizeof(mainconfig));
radiusd.main:344                radlog_dir = strdup(optarg);
radiusd.main:411                read_mainconfig(0)

One of the first thing in read_mainconfig() is

mainconfig.read_mainconfig:722  radlog(....);

So at this point, radlog_dest is always RADLOG_FILES, and then it
executes

log.vradlog:94                  fopen(mainconfig.log_file, "a")

mainconfig is not yet been filled, so mainconfig.log_file = 0
and the fprintf() on line 95 coredumps.

mainconfig is filled later :

mainconfig.read_mainconfig:729  read_radius_conf_file()

It doesn't help to use 'radiusd -l stdout', because radlog_dest
is set later too :

radiusd.main:438... radlog_dest is set according to radlog_dir


I looked a the 0.8.1 version, which is written the same way.
So I don't understand how it can work. I suppose that I'm missing
something, but I don't understand what and where...

-- 
Samuel Degrande           LIFL - UMR 8022 CNRS - Bat M3
Phone: (33)3.20.43.47.38  USTL - Universite de Lille 1
Fax:   (33)3.20.43.65.66  59655 VILLENEUVE D'ASCQ CEDEX - FRANCE

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to