Skip to content

Commit 9317dd8

Browse files
committed
Extend ASAN env var to apply to libmodsecurity as well
Example usage: $ cd /home/test $ ASAN=1 make lms nginx-static $ ./nginx-static (do your testing with e.g. nikto tool) $ kill `cat /var/run/nginx.pid` (check for ASAN output) Note that it is required to set "master_process off;" in nginx.conf for proper testing. ASAN output goes to /var/log/nginx/error.log once nginx is started. Before opening error log, ASAN output goes to stderr.
1 parent 4b87747 commit 9317dd8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

states/files/Makefile.tmpl

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ LD_OPT_ADD=
1717
ifdef ASAN
1818
CC_OPT_ADD= -fsanitize=address
1919
LD_OPT_ADD= -fsanitize=address
20+
LMS_ASAN_ENV= CFLAGS=-fsanitize=address CXXFLAGS=-fsanitize=address LDFLAGS=-fsanitize=address
2021
endif
2122

2223
NGINX_CC_OPT=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC
@@ -86,7 +87,7 @@ ModSecurity-nginx:
8687
lms: ModSecurity
8788
@cd ModSecurity && \
8889
./build.sh && \
89-
./configure --prefix=/usr --without-lmdb && \
90+
$(LMS_ASAN_ENV) ./configure --prefix=/usr --without-lmdb && \
9091
make $(MAKEJFLAG) && \
9192
sudo make install
9293
@touch $@

0 commit comments

Comments
 (0)