Is it possible to dynamically install a new module ? i.e. configure/make/install radius then compile a new module seperately and move its .so to the lib directory ? -- View this message in context: http://www.nabble.com/dynamic-module-installation-t1325486.html#a3537333 Sent from the FreeRadius - User forum at Nabble.com.
Thanks. Thats what I thought ... just wanted to make sure. -- View this message in context: http://www.nabble.com/dynamic-module-installation-t1325486.html#a3539698 Sent from the FreeRadius - User forum at Nabble.com.
On Mar 22, 2006, at 10:15, Alan DeKok wrote:
jasonatx0001 <jasonatx0001@yahoo.com> wrote:
Is it possible to dynamically install a new module ? i.e. configure/make/install radius then compile a new module seperately and move its .so to the lib directory ?
Yes. That's the intent behind the design.
Is there an example on how to construct the makefile for that? I know how to do it if you put the module into the freeradius structuure, but can it be built outside that structure?
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. -- View this message in context: http://www.nabble.com/dynamic-module-installation-t1325486.html#a3554750 Sent from the FreeRadius - User forum at Nabble.com.
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
Hmmmm, at this point I am not using a makefile, I am just compiling manually using these commands gcc -c -WALL -fPIC -I/freeradius-1.1.0/src/include -DNDEBUG -o rlm_mymodule.o rlm_mymodule.c gcc -shared -lcurl -lssl -o rlm_mymodule.so rlm_mymodule.o -- View this message in context: http://www.nabble.com/dynamic-module-installation-t1325486.html#a3637118 Sent from the FreeRadius - User forum at Nabble.com.
participants (3)
-
Alan DeKok -
Doug Hardie -
jasonatx0001