Adding modified libraries without recompiling entirely FreeRADIUS

Alan DeKok aland at
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,
> wrote my version of rlm_chap.c.
> Everything compiles and works fine when i do:
>      ./configure
>      make
>      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
> further)

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

  Learn C.

  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.

  Alan DeKok.

More information about the Freeradius-Users mailing list