aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_static_module.c
diff options
context:
space:
mode:
authorAndrey Belov <defan@nginx.com>2012-02-13 16:32:21 +0000
committerAndrey Belov <defan@nginx.com>2012-02-13 16:32:21 +0000
commit8ce8f6667f3f14c004148138c0aec3dff79c350b (patch)
tree5dae7abaf7499a6e4d5bafe1d6e742d78f53989e /src/http/modules/ngx_http_static_module.c
parentbd1e719bf9c4bc58076e7b52e87be645c9b803f5 (diff)
downloadnginx-8ce8f6667f3f14c004148138c0aec3dff79c350b.tar.gz
nginx-8ce8f6667f3f14c004148138c0aec3dff79c350b.zip
Support for disable_symlinks in various modules.
Diffstat (limited to 'src/http/modules/ngx_http_static_module.c')
-rw-r--r--src/http/modules/ngx_http_static_module.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_static_module.c b/src/http/modules/ngx_http_static_module.c
index a0e302ad1..f4904fc00 100644
--- a/src/http/modules/ngx_http_static_module.c
+++ b/src/http/modules/ngx_http_static_module.c
@@ -94,6 +94,9 @@ ngx_http_static_handler(ngx_http_request_t *r)
of.min_uses = clcf->open_file_cache_min_uses;
of.errors = clcf->open_file_cache_errors;
of.events = clcf->open_file_cache_events;
+#if (NGX_HAVE_OPENAT)
+ of.disable_symlinks = clcf->disable_symlinks;
+#endif
if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool)
!= NGX_OK)
@@ -112,6 +115,10 @@ ngx_http_static_handler(ngx_http_request_t *r)
break;
case NGX_EACCES:
+#if (NGX_HAVE_OPENAT)
+ case NGX_EMLINK:
+ case NGX_ELOOP:
+#endif
level = NGX_LOG_ERR;
rc = NGX_HTTP_FORBIDDEN;