dynamic module installation

Doug Hardie bc979 at lafn.org
Fri Mar 24 02:45:22 CET 2006


On Mar 23, 2006, at 08:07, jasonatx0001 wrote:

>
> yes it can. I simply built my module with gcc as a dynamic library.  
> Just be
> sure to use the same compiler flags that were used to build the  
> freeradius
> sever - for example I was experiencing problems until I added the  
> NDEBUG
> flag. After I built my module I just put the .so in the libs  
> directory and
> added modified my config files.

Not having a lot of success with this.  I used that info and built  
the module.  this is a module that works fine when built directly  
into freeradius.  Copied it to libs and tried to use it.  With the  
NDEBUG flag I get a core dump.  My module does use the DEBUG  
command.  So I removed that.  No more core dumps, but a connect to a  
unix socket fails miserably.  The socket is there and works.   
Restoring the original module works fine too.  Perhaps something is  
still wrong in the way I am making the module.  Here is the makefile:

VERS = 1.0.5

CFLAGS  =  -I/usr/include -I/usr/local/msql3/include \
            -I/usr/ports/net/freeradius/work/freeradius-$(VERS)/src/ 
include

LIBS    =  -lc -L/usr/local/msql3/lib -lmsql

ALL:    rlm_msql.o rlm_msql

rlm_msql.o:     rlm_msql.c
         cc -g -fPIC -c $(CFLAGS) rlm_msql.c

rlm_msql:       rlm_msql.o
         cc -g -shared -soname,rlm_msql-$(VERS).so $(LIBS) \
                         -o rlm_msql-$(VERS).so rlm_msql.o

install:        rlm_msql
         install rlm_msql-$(VERS).so /usr/local/lib
         ln -s /usr/local/lib/rlm_msql-$(VERS).so /usr/local/lib/ 
rlm_msql.so






More information about the Freeradius-Users mailing list