Mercurial > hg > nginx-quic
annotate auto/install @ 6409:71edd9192f24
Fixed buffer over-read while logging invalid request headers.
Since 667aaf61a778 (1.1.17) the ngx_http_parse_header_line() function can return
NGX_HTTP_PARSE_INVALID_HEADER when a header contains NUL character. In this
case the r->header_end pointer isn't properly initialized, but the log message
in ngx_http_process_request_headers() hasn't been adjusted. It used the pointer
in size calculation, which might result in up to 2k buffer over-read.
Found with afl-fuzz.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Wed, 24 Feb 2016 16:01:23 +0300 |
parents | cfc3cfa434ec |
children | 8e6f34342eb6 |
rev | line source |
---|---|
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
440
diff
changeset
|
1 |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
440
diff
changeset
|
2 # Copyright (C) Igor Sysoev |
4412 | 3 # Copyright (C) Nginx, Inc. |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
440
diff
changeset
|
4 |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
5 |
599 | 6 if [ $USE_PERL = YES ]; then |
7 | |
8 cat << END >> $NGX_MAKEFILE | |
9 | |
10 install_perl_modules: | |
4841
95ce3172493e
Configure: fixed make macros to use parentheses instead of braces.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4740
diff
changeset
|
11 cd $NGX_OBJS/src/http/modules/perl && \$(MAKE) install |
599 | 12 END |
13 | |
14 NGX_INSTALL_PERL_MODULES=install_perl_modules | |
15 | |
16 fi | |
17 | |
18 | |
2758 | 19 case ".$NGX_SBIN_PATH" in |
20 ./*) | |
21 ;; | |
22 | |
23 *) | |
24 NGX_SBIN_PATH=$NGX_PREFIX/$NGX_SBIN_PATH | |
25 ;; | |
26 esac | |
27 | |
28 | |
6383 | 29 case ".$NGX_MODULES_PATH" in |
30 ./*) | |
31 ;; | |
32 | |
33 *) | |
34 NGX_MODULES_PATH=$NGX_PREFIX/$NGX_MODULES_PATH | |
35 ;; | |
36 esac | |
37 | |
38 NGX_MODULES_PATH=`dirname $NGX_MODULES_PATH/.` | |
39 | |
40 | |
2758 | 41 case ".$NGX_CONF_PATH" in |
42 ./*) | |
43 ;; | |
44 | |
45 *) | |
46 NGX_CONF_PATH=$NGX_PREFIX/$NGX_CONF_PATH | |
47 ;; | |
48 esac | |
49 | |
50 | |
51 NGX_CONF_PREFIX=`dirname $NGX_CONF_PATH` | |
52 | |
53 | |
54 case ".$NGX_PID_PATH" in | |
55 ./*) | |
56 ;; | |
57 | |
58 *) | |
59 NGX_PID_PATH=$NGX_PREFIX/$NGX_PID_PATH | |
60 ;; | |
61 esac | |
62 | |
63 | |
64 case ".$NGX_ERROR_LOG_PATH" in | |
4199
874a2f505e2a
Fixed configuration summary and manpage contents for the special
Ruslan Ermilov <ru@nginx.com>
parents:
4007
diff
changeset
|
65 ./* | .) |
2758 | 66 ;; |
67 | |
68 *) | |
69 NGX_ERROR_LOG_PATH=$NGX_PREFIX/$NGX_ERROR_LOG_PATH | |
70 ;; | |
71 esac | |
72 | |
73 | |
74 case ".$NGX_HTTP_LOG_PATH" in | |
75 ./*) | |
76 ;; | |
77 | |
78 *) | |
79 NGX_HTTP_LOG_PATH=$NGX_PREFIX/$NGX_HTTP_LOG_PATH | |
80 ;; | |
81 esac | |
82 | |
83 | |
4376
9346356e433d
configure on Solaris fixed
Sergey Budnevitch <sb@waeme.net>
parents:
4303
diff
changeset
|
84 if test -f man/nginx.8 ; then |
4303
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
85 NGX_MAN=man/nginx.8 |
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
86 else |
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
87 NGX_MAN=docs/man/nginx.8 |
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
88 fi |
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
89 |
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
90 if test -d html ; then |
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
91 NGX_HTML=html |
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
92 else |
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
93 NGX_HTML=docs/html |
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
94 fi |
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
95 |
469 | 96 cat << END >> $NGX_MAKEFILE |
467 | 97 |
4007
7e3c557c2604
Rebuild manpage only if needed.
Maxim Dounin <mdounin@mdounin.ru>
parents:
3801
diff
changeset
|
98 manpage: $NGX_OBJS/nginx.8 |
7e3c557c2604
Rebuild manpage only if needed.
Maxim Dounin <mdounin@mdounin.ru>
parents:
3801
diff
changeset
|
99 |
4303
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
100 $NGX_OBJS/nginx.8: $NGX_MAN $NGX_AUTO_CONFIG_H |
3788 | 101 sed -e "s|%%PREFIX%%|$NGX_PREFIX|" \\ |
102 -e "s|%%PID_PATH%%|$NGX_PID_PATH|" \\ | |
103 -e "s|%%CONF_PATH%%|$NGX_CONF_PATH|" \\ | |
4199
874a2f505e2a
Fixed configuration summary and manpage contents for the special
Ruslan Ermilov <ru@nginx.com>
parents:
4007
diff
changeset
|
104 -e "s|%%ERROR_LOG_PATH%%|${NGX_ERROR_LOG_PATH:-stderr}|" \\ |
4303
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
105 < $NGX_MAN > \$@ |
3788 | 106 |
6408
cfc3cfa434ec
Configure: added "build" target.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
107 install: build $NGX_INSTALL_PERL_MODULES |
2009 | 108 test -d '\$(DESTDIR)$NGX_PREFIX' || mkdir -p '\$(DESTDIR)$NGX_PREFIX' |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
109 |
2009 | 110 test -d '\$(DESTDIR)`dirname "$NGX_SBIN_PATH"`' \ |
111 || mkdir -p '\$(DESTDIR)`dirname "$NGX_SBIN_PATH"`' | |
112 test ! -f '\$(DESTDIR)$NGX_SBIN_PATH' \ | |
113 || mv '\$(DESTDIR)$NGX_SBIN_PATH' \ | |
114 '\$(DESTDIR)$NGX_SBIN_PATH.old' | |
115 cp $NGX_OBJS/nginx '\$(DESTDIR)$NGX_SBIN_PATH' | |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
116 |
2009 | 117 test -d '\$(DESTDIR)$NGX_CONF_PREFIX' \ |
118 || mkdir -p '\$(DESTDIR)$NGX_CONF_PREFIX' | |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
119 |
2009 | 120 cp conf/koi-win '\$(DESTDIR)$NGX_CONF_PREFIX' |
121 cp conf/koi-utf '\$(DESTDIR)$NGX_CONF_PREFIX' | |
122 cp conf/win-utf '\$(DESTDIR)$NGX_CONF_PREFIX' | |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
123 |
2009 | 124 test -f '\$(DESTDIR)$NGX_CONF_PREFIX/mime.types' \ |
125 || cp conf/mime.types '\$(DESTDIR)$NGX_CONF_PREFIX' | |
126 cp conf/mime.types '\$(DESTDIR)$NGX_CONF_PREFIX/mime.types.default' | |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
127 |
2009 | 128 test -f '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi_params' \ |
129 || cp conf/fastcgi_params '\$(DESTDIR)$NGX_CONF_PREFIX' | |
130 cp conf/fastcgi_params \ | |
131 '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi_params.default' | |
1352 | 132 |
3383 | 133 test -f '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi.conf' \ |
134 || cp conf/fastcgi.conf '\$(DESTDIR)$NGX_CONF_PREFIX' | |
135 cp conf/fastcgi.conf '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi.conf.default' | |
136 | |
3609 | 137 test -f '\$(DESTDIR)$NGX_CONF_PREFIX/uwsgi_params' \ |
138 || cp conf/uwsgi_params '\$(DESTDIR)$NGX_CONF_PREFIX' | |
139 cp conf/uwsgi_params \ | |
140 '\$(DESTDIR)$NGX_CONF_PREFIX/uwsgi_params.default' | |
141 | |
3637 | 142 test -f '\$(DESTDIR)$NGX_CONF_PREFIX/scgi_params' \ |
143 || cp conf/scgi_params '\$(DESTDIR)$NGX_CONF_PREFIX' | |
144 cp conf/scgi_params \ | |
145 '\$(DESTDIR)$NGX_CONF_PREFIX/scgi_params.default' | |
146 | |
2009 | 147 test -f '\$(DESTDIR)$NGX_CONF_PATH' \ |
2982
fe23e95ba993
name of file specified in --conf-path was not honored during installation
Igor Sysoev <igor@sysoev.ru>
parents:
2850
diff
changeset
|
148 || cp conf/nginx.conf '\$(DESTDIR)$NGX_CONF_PATH' |
2009 | 149 cp conf/nginx.conf '\$(DESTDIR)$NGX_CONF_PREFIX/nginx.conf.default' |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
150 |
2009 | 151 test -d '\$(DESTDIR)`dirname "$NGX_PID_PATH"`' \ |
152 || mkdir -p '\$(DESTDIR)`dirname "$NGX_PID_PATH"`' | |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
153 |
2009 | 154 test -d '\$(DESTDIR)`dirname "$NGX_HTTP_LOG_PATH"`' || \ |
155 mkdir -p '\$(DESTDIR)`dirname "$NGX_HTTP_LOG_PATH"`' | |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
156 |
2009 | 157 test -d '\$(DESTDIR)$NGX_PREFIX/html' \ |
4303
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
158 || cp -R $NGX_HTML '\$(DESTDIR)$NGX_PREFIX' |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
159 END |
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
160 |
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
161 |
4199
874a2f505e2a
Fixed configuration summary and manpage contents for the special
Ruslan Ermilov <ru@nginx.com>
parents:
4007
diff
changeset
|
162 if test -n "$NGX_ERROR_LOG_PATH"; then |
469 | 163 cat << END >> $NGX_MAKEFILE |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
440
diff
changeset
|
164 |
2009 | 165 test -d '\$(DESTDIR)`dirname "$NGX_ERROR_LOG_PATH"`' || \ |
166 mkdir -p '\$(DESTDIR)`dirname "$NGX_ERROR_LOG_PATH"`' | |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
440
diff
changeset
|
167 END |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
440
diff
changeset
|
168 |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
440
diff
changeset
|
169 fi |
2850
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
170 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
171 |
6383 | 172 if test -n "$NGX_MODULES"; then |
173 cat << END >> $NGX_MAKEFILE | |
174 | |
175 test -d '\$(DESTDIR)$NGX_MODULES_PATH' \ | |
176 || mkdir -p '\$(DESTDIR)$NGX_MODULES_PATH' | |
177 cp $NGX_MODULES '\$(DESTDIR)$NGX_MODULES_PATH' | |
178 END | |
179 | |
180 fi | |
181 | |
182 | |
2850
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
183 # create Makefile |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
184 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
185 cat << END >> Makefile |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
186 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
187 build: |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
188 \$(MAKE) -f $NGX_MAKEFILE |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
189 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
190 install: |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
191 \$(MAKE) -f $NGX_MAKEFILE install |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
192 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
193 upgrade: |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
194 $NGX_SBIN_PATH -t |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
195 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
196 kill -USR2 \`cat $NGX_PID_PATH\` |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
197 sleep 1 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
198 test -f $NGX_PID_PATH.oldbin |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
199 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
200 kill -QUIT \`cat $NGX_PID_PATH.oldbin\` |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
201 END |