From 1bb89914d7ba97b18b5ce3cc353a90917da3eb29 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Sat, 20 Feb 2021 12:44:26 +0300 Subject: Configure: marked top-level make targets as phony. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported by Thibault Nélis. --- auto/init | 2 ++ auto/install | 2 ++ 2 files changed, 4 insertions(+) (limited to 'auto') diff --git a/auto/init b/auto/init index 910f5294b..f816dfc4d 100644 --- a/auto/init +++ b/auto/init @@ -48,4 +48,6 @@ default: build clean: rm -rf Makefile $NGX_OBJS + +.PHONY: default clean END diff --git a/auto/install b/auto/install index d884487a1..c764fdd2f 100644 --- a/auto/install +++ b/auto/install @@ -215,4 +215,6 @@ upgrade: test -f $NGX_PID_PATH.oldbin kill -QUIT \`cat $NGX_PID_PATH.oldbin\` + +.PHONY: build install modules upgrade END -- cgit From 71eb19da43e3382ce97a14b6d3cd564881da37e7 Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Mon, 1 Mar 2021 20:00:43 +0300 Subject: Improved maximum errno detection. Previously, systems without sys_nerr (or _sys_nerr) were handled with an assumption that errors start at 0 and continuous. This is, however, not something POSIX requires, and not true on some platforms. Notably, on Linux, where sys_nerr is no longer available for newly linked binaries starting with glibc 2.32, there are gaps in error list, which used to stop us from properly detecting maximum errno. Further, on GNU/Hurd errors start at 0x40000001. With this change, maximum errno detection is moved to the runtime code, now able to ignore gaps, and also detects the first error if needed. This fixes observed "Unknown error" messages as seen on Linux with glibc 2.32 and on GNU/Hurd. --- auto/unix | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'auto') diff --git a/auto/unix b/auto/unix index ff9697a4e..845e41fc6 100644 --- a/auto/unix +++ b/auto/unix @@ -753,34 +753,6 @@ if [ $ngx_found = no ]; then fi -if [ $ngx_found = no ]; then - - # Solaris has no sys_nerr - ngx_feature='maximum errno' - ngx_feature_name=NGX_SYS_NERR - ngx_feature_run=value - ngx_feature_incs='#include - #include - #include ' - ngx_feature_path= - ngx_feature_libs= - ngx_feature_test='int n; - char *p; - for (n = 1; n < 1000; n++) { - errno = 0; - p = strerror(n); - if (errno == EINVAL - || p == NULL - || strncmp(p, "Unknown error", 13) == 0) - { - break; - } - } - printf("%d", n);' - . auto/feature -fi - - ngx_feature="localtime_r()" ngx_feature_name="NGX_HAVE_LOCALTIME_R" ngx_feature_run=no -- cgit From 4c5a49ce4c756cee85b27f9fe501f52adc7b9f1f Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Mon, 1 Mar 2021 20:00:45 +0300 Subject: Introduced strerrordesc_np() support. The strerrordesc_np() function, introduced in glibc 2.32, provides an async-signal-safe way to obtain error messages. This makes it possible to avoid copying error messages. --- auto/unix | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'auto') diff --git a/auto/unix b/auto/unix index 845e41fc6..9c402e787 100644 --- a/auto/unix +++ b/auto/unix @@ -727,17 +727,33 @@ ngx_feature_test="char buf[1]; struct iovec vec[1]; ssize_t n; . auto/feature -ngx_feature="sys_nerr" -ngx_feature_name="NGX_SYS_NERR" -ngx_feature_run=value -ngx_feature_incs='#include - #include ' +# strerrordesc_np(), introduced in glibc 2.32 + +ngx_feature="strerrordesc_np()" +ngx_feature_name="NGX_HAVE_STRERRORDESC_NP" +ngx_feature_run=no +ngx_feature_incs='#include ' ngx_feature_path= ngx_feature_libs= -ngx_feature_test='printf("%d", sys_nerr);' +ngx_feature_test="char *p; p = strerrordesc_np(0); + if (p == NULL) return 1" . auto/feature +if [ $ngx_found = no ]; then + + ngx_feature="sys_nerr" + ngx_feature_name="NGX_SYS_NERR" + ngx_feature_run=value + ngx_feature_incs='#include + #include ' + ngx_feature_path= + ngx_feature_libs= + ngx_feature_test='printf("%d", sys_nerr);' + . auto/feature +fi + + if [ $ngx_found = no ]; then # Cygiwn defines _sys_nerr -- cgit From c2e22bcf325ee0031d1c86fbdfb79a2f8e1b4a7b Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Fri, 5 Mar 2021 17:16:29 +0300 Subject: Mail: realip module. When configured with the "set_real_ip_from", it can set client's IP address as visible in logs to the one obtained via the PROXY protocol. --- auto/modules | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'auto') diff --git a/auto/modules b/auto/modules index f1c63f3d5..f5a459783 100644 --- a/auto/modules +++ b/auto/modules @@ -985,6 +985,12 @@ if [ $MAIL != NO ]; then ngx_module_srcs=src/mail/ngx_mail_proxy_module.c . auto/module + + ngx_module_name=ngx_mail_realip_module + ngx_module_deps= + ngx_module_srcs=src/mail/ngx_mail_realip_module.c + + . auto/module fi -- cgit