comparison src/http/ngx_http_upstream.c @ 7174:84e53e4735a4

Retain CAP_NET_RAW capability for transparent proxying. The capability is retained automatically in unprivileged worker processes after changing UID if transparent proxying is enabled at least once in nginx configuration. The feature is only available in Linux.
author Roman Arutyunyan <arut@nginx.com>
date Wed, 13 Dec 2017 20:40:53 +0300
parents a762ddf22dbb
children 93abb5a855d6
comparison
equal deleted inserted replaced
7173:057adb2a9d23 7174:84e53e4735a4
6076 } 6076 }
6077 6077
6078 if (cf->args->nelts > 2) { 6078 if (cf->args->nelts > 2) {
6079 if (ngx_strcmp(value[2].data, "transparent") == 0) { 6079 if (ngx_strcmp(value[2].data, "transparent") == 0) {
6080 #if (NGX_HAVE_TRANSPARENT_PROXY) 6080 #if (NGX_HAVE_TRANSPARENT_PROXY)
6081 ngx_core_conf_t *ccf;
6082
6083 ccf = (ngx_core_conf_t *) ngx_get_conf(cf->cycle->conf_ctx,
6084 ngx_core_module);
6085
6086 ccf->transparent = 1;
6081 local->transparent = 1; 6087 local->transparent = 1;
6082 #else 6088 #else
6083 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 6089 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
6084 "transparent proxying is not supported " 6090 "transparent proxying is not supported "
6085 "on this platform, ignored"); 6091 "on this platform, ignored");