Next: Installing, Previous: What is LibNetBlock?, Up: Top [Contents]
Requirements for compiling the library:
The sys/stat.h header contains functions needed to check an executable’s type. If it is a symbolic link, LibNetBlock will follow it.
The dlfcn.h header contains functions needed to call the original
functions. It has to have RTLD_NEXT
defined. LibNetBlock wouldn’t work
without this, so it won’t compile without this.
The stdarg.h/varargs.h header contains stuff needed to intercept the opening functions.
make
program
Type
./configure
to configure LibNetBlock for your system.
If you want to enable the public interface of LibNetBlock, configure the library with
‘./configure --enable-public-interface’
See the chapter on developing to learn how to use LibNetBlock (Developing).
LibNetBlock allows some programs to be banned (not allowed to run under LibNetBlock, because they might need accesss to the network). One banning file is always supported - ${sysconfdir}/libnetblock.progban (${sysconfdir} is /usr/local/etc unless set otherwise during configure).
If you want to disable additional banning files pointed to by environment variables, configure the library with
‘./configure --enable-environment=no’
If you want to disable additional banning files in users’ home directories, configure the library with
‘./configure --enable-user-files=no’
Type
make
to compile the library.
Documentation comes compiled (and can be copied right away), but can be changed
and recompiled, if you have the makeinfo
program (texinfo package).
Type
‘make install’
to install the library.
To make LibNetBlock impossible to detect, you must change all the internal
public function names. To do this, you can use the name randomizing scripts in the
src directory. You will need the sed
and sort
programs
and either Perl or GNU awk.
You can change the name prefix at the top of these scripts to something unique.
When the script is done working, recompile and reinstall the library.
Thus, a typical build sequence with less detection would be
./configure
‘cd src’
./randomize_names_gawk.sh
(or ‘make x-randomnames’)
‘cd ..’
make
If you want to do this manually (or you don’t have sed
or
sort
and Perl or GNU awk), open the src/lnb_priv.h file in a text
editor and look for lines starting with extern
. The __lnb...
names in these
lines are the function names to convert. Take each name and substitute all its
appearances in each source file in the src directory using a text editor or
the following commands:
‘sed -i 's/__lnb_real_execve_location/_your_function_name1/g' *.c* *.h*’
‘sed -i 's/__lnb_real_system_location/_your_function_name2/g' *.c* *.h*’
...
‘sed -i 's/__lnb_get_init_stage/_your_function_nameN/g' *.c* *.h*’
Then find other symbols that start with __lnb
in other files and change them
too (using a text editor or commands similar to the above).
Then recompile and reinstall the library.
NOTE: ‘make install’ is NOT recommended. Create and install an RPM package instead, if possible.
To create an RPM package:
To create an RPM package (the old way):
Next: Installing, Previous: What is LibNetBlock?, Up: Top [Contents]