wargio / naxsi

NAXSI is an open-source, high performance, low rules maintenance WAF for NGINX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

libinjection submodule

rlovell3 opened this issue · comments

commented

Giovanni, first of all, thank you for maintaining a surviving version of naxsi.

Consider this more of a basic question than a potential new "issue".

I have a question about the configure command and its output. I built everything from source, including pcre and zlib. I've added the "--add-dynamic-module=../naxsi/naxsi_src" directive to my configure command. The output of ./configure... contains some confusing statements that I'd like to run by you.

First, note that I see quite clearly the naxsi_src/libinjection and /libinjection_ngxbuild directories in your source tree.

The confusion comes when, after complaining of not being able to find libinjection, I get a subsequent statement that the submodule libinjection was used, and that naxsi was configured.

In the output, I note that the script expects to find "libinjection.pc", but the actual filename within your subdir is "libinjection.pc.in". So I'm left in a quandary. Is the script complaining about not finding libinjection, but then later getting on with things and using the libinjection submodule that it eventually found in your tree? That is what it seems like, but I wanted to ask you about it before I commit to building libinjection itself from source.

output of configure command

... (omitted for brevity)
configuring additional dynamic modules
adding module in ../naxsi/naxsi_src
Package libinjection was not found in the pkg-config search path.
Perhaps you should add the directory containing `libinjection.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libinjection' found
Package libinjection was not found in the pkg-config search path.
Perhaps you should add the directory containing `libinjection.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libinjection' found
Using submodule libinjection
 + naxsi was configured  

... (omitted for brevity)
  

the error that you see is generated by pkg-config here

LIBINJECTION_CFLAGS="$(pkg-config --cflags libinjection)"

I see many users getting confused by this and i will probably try to hide it in the next release of naxsi.

To be clear: fedora has a system package for libinjection and you don't need to have it, because it is provided with naxsi, but i had a user asking to have this implemented so they can use the system shared library instead of the statically compiled one within the module. this is fairly common in certain distributions to avoid binaries to build things already available.