Mercurial > hg > nginx
comparison src/http/modules/ngx_http_static_module.c @ 4478:08713bac87fc
Support for disable_symlinks in various modules.
author | Andrey Belov <defan@nginx.com> |
---|---|
date | Mon, 13 Feb 2012 16:32:21 +0000 |
parents | d620f497c50f |
children | 13e09cf11d4e |
comparison
equal
deleted
inserted
replaced
4477:7033faf6dc3c | 4478:08713bac87fc |
---|---|
92 of.directio = clcf->directio; | 92 of.directio = clcf->directio; |
93 of.valid = clcf->open_file_cache_valid; | 93 of.valid = clcf->open_file_cache_valid; |
94 of.min_uses = clcf->open_file_cache_min_uses; | 94 of.min_uses = clcf->open_file_cache_min_uses; |
95 of.errors = clcf->open_file_cache_errors; | 95 of.errors = clcf->open_file_cache_errors; |
96 of.events = clcf->open_file_cache_events; | 96 of.events = clcf->open_file_cache_events; |
97 #if (NGX_HAVE_OPENAT) | |
98 of.disable_symlinks = clcf->disable_symlinks; | |
99 #endif | |
97 | 100 |
98 if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool) | 101 if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool) |
99 != NGX_OK) | 102 != NGX_OK) |
100 { | 103 { |
101 switch (of.err) { | 104 switch (of.err) { |
110 level = NGX_LOG_ERR; | 113 level = NGX_LOG_ERR; |
111 rc = NGX_HTTP_NOT_FOUND; | 114 rc = NGX_HTTP_NOT_FOUND; |
112 break; | 115 break; |
113 | 116 |
114 case NGX_EACCES: | 117 case NGX_EACCES: |
118 #if (NGX_HAVE_OPENAT) | |
119 case NGX_EMLINK: | |
120 case NGX_ELOOP: | |
121 #endif | |
115 | 122 |
116 level = NGX_LOG_ERR; | 123 level = NGX_LOG_ERR; |
117 rc = NGX_HTTP_FORBIDDEN; | 124 rc = NGX_HTTP_FORBIDDEN; |
118 break; | 125 break; |
119 | 126 |