summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules/ngx_http_log_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_log_module.c
parentbd1e719bf9c4bc58076e7b52e87be645c9b803f5 (diff)
downloadnginx-8ce8f6667f3f14c004148138c0aec3dff79c350b.tar.gz
nginx-8ce8f6667f3f14c004148138c0aec3dff79c350b.tar.bz2
Support for disable_symlinks in various modules.
Diffstat (limited to 'src/http/modules/ngx_http_log_module.c')
-rw-r--r--src/http/modules/ngx_http_log_module.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/http/modules/ngx_http_log_module.c b/src/http/modules/ngx_http_log_module.c
index bfbbe93bd..da3b33c96 100644
--- a/src/http/modules/ngx_http_log_module.c
+++ b/src/http/modules/ngx_http_log_module.c
@@ -373,6 +373,8 @@ ngx_http_log_script_write(ngx_http_request_t *r, ngx_http_log_script_t *script,
ngx_http_log_loc_conf_t *llcf;
ngx_http_core_loc_conf_t *clcf;
+ clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
+
if (!r->root_tested) {
/* test root directory existance */
@@ -384,8 +386,6 @@ ngx_http_log_script_write(ngx_http_request_t *r, ngx_http_log_script_t *script,
path.data[root] = '\0';
- clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
-
ngx_memzero(&of, sizeof(ngx_open_file_info_t));
of.valid = clcf->open_file_cache_valid;
@@ -394,6 +394,9 @@ ngx_http_log_script_write(ngx_http_request_t *r, ngx_http_log_script_t *script,
of.test_only = 1;
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)
@@ -441,6 +444,9 @@ ngx_http_log_script_write(ngx_http_request_t *r, ngx_http_log_script_t *script,
of.valid = llcf->open_file_cache_valid;
of.min_uses = llcf->open_file_cache_min_uses;
of.directio = NGX_OPEN_FILE_DIRECTIO_OFF;
+#if (NGX_HAVE_OPENAT)
+ of.disable_symlinks = clcf->disable_symlinks;
+#endif
if (ngx_open_cached_file(llcf->open_file_cache, &log, &of, r->pool)
!= NGX_OK)