Adding modified libraries without recompiling entirely FreeRADIUS
aland at deployingradius.com
Fri Apr 12 17:44:20 CEST 2013
yoann Couble wrote:
> Hi everyone,
> I have a freeRADIUS 2.0.4 server which has been running well for the
> past two years.
Upgrade to 2.2.0.
> With the sources downloaded from packages.debian.org,
> wrote my version of rlm_chap.c.
> Everything compiles and works fine when i do:
> make install
> from the source folder and run it with /radiusd/.
> NB: To avoid lib conflicts i remove the libs generated in /usr/local/lib
> during installation before i start again /usr/sbin/freeradius
That might work. It's not something that's well tested. Especially
with a very old version of the server.
> But now i would like to update my working version of freeradius (which
> was installed through an apt-get install) without causing much trouble.
> As I only modified rlm_chap.c I thought i could simply replace the
> current library
Why not just re-install the package? You're going out of your way to
hack things, when you could just build and install the package.
> After that i restart freeradius (the apt-get version) with
> freeradius -X
> Everything looks fine but when i send a request i get a segmentation
> fault when the server tries to enter chap module. (see the debug entry
You probably made a coding error in your module. The solution is to
debug the code you wrote.
> If i go back and replace /usr/lib/freeradius/rlm_chap-2.0.4.so
> <http://rlm_chap-2.0.4.so> by the original
> Everything works fine again.
i.e. the code we ship (usually) works.
> I am pretty sure it has something to do with compilation and the way
> files were generated.
> Do you think it is possible to do what I want? i.e. inserting a modified
> library into the working set of library.
Your code is wrong. Fix it.
> Reinstalling the working freeradius or using the compiled files is not
> an possibility.
Good luck with that.
> If you have any idea on what I am doing wrong (I am still a beginner and
> I probably do a lot of things wrong), please feel free to tell me and to
> share with me if you had similar situations.
Read doc/bugs for a *basic* introduction to gdb.
But this list isn't the place for learning how to debug your code.
Sorry. We're too busy adding new features to be able to help you with
fixing your code, or with fixing very old FreeRADIUS code.
More information about the Freeradius-Users