Re-compiling modules

John Dennis jdennis at redhat.com
Thu Jun 4 03:20:14 CEST 2009


Rupert Finnigan wrote:
> Hi All,
>  
> I'm *attempting* to recompile the rlm_mschap module with a quick mod to
> hopefully fix my host authentication domain extraction problems.
>  
> Is this as simple as running make, and copying the resulting files to
> "/usr/lib" (on my system atleast)?? And if so, is it just the two files
> I need to copy, the .la and the .so? If this eventually works I'll
> rebuild my rpms, but I'm looking for a quick way of finding out if this
> does actually behave as expected.
>  
> Sorry if this is a bit of an obvious question - I've never really done
> much C before.

First you must run the configure script from the top level before you
run make. It's best to run configure with the exact same arguments the
RPM build would use. The easiest way to accomplish this is by running
rpmbuild and preserving the build tree (I think you'll have to comment
out the %clean section of the spec file first). Then modify the code and
run make in the directory. You'll only need the .so, not the .la. Be
careful about the destination directory, it's probably not /usr/lib,
more likely /usr/lib/freeradius, but it depends on the system, could be
/usr/share/lib/freeradius or /usr/local/lib/freeradius. You can figure
this out by looking for the original .so (the locate command helps) or
if you're using an RPM based install, as it sounds like you are then do a:

% rpm -ql freeradius | grep rlm_mschap

that will print out the file location.

HTH,

John

-- 
John Dennis <jdennis at redhat.com>

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/



More information about the Freeradius-Users mailing list