aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_script.c
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2012-02-27 16:51:28 +0000
committerValentin Bartenev <vbart@nginx.com>2012-02-27 16:51:28 +0000
commit0e05ca0404b6ef99fd809c6a1c362c6ef923cca6 (patch)
tree4a302c720b6fc8aa510fda227a6e6feb0e82ee92 /src/http/ngx_http_script.c
parent346791187f358f852c2434f29a86754e7ab10f5b (diff)
downloadnginx-0e05ca0404b6ef99fd809c6a1c362c6ef923cca6.tar.gz
nginx-0e05ca0404b6ef99fd809c6a1c362c6ef923cca6.zip
Disable symlinks: initialization of the "disable_symlinks" field in
ngx_open_file_info_t moved to a separate function. This is preparation for the "from=" parameter implementation of the "disable_symlinks" directive.
Diffstat (limited to 'src/http/ngx_http_script.c')
-rw-r--r--src/http/ngx_http_script.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/http/ngx_http_script.c b/src/http/ngx_http_script.c
index a8f193a32..ce290f4ef 100644
--- a/src/http/ngx_http_script.c
+++ b/src/http/ngx_http_script.c
@@ -1505,9 +1505,12 @@ ngx_http_script_file_code(ngx_http_script_engine_t *e)
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_http_set_disable_symlinks(r, clcf, &path, &of) != NGX_OK) {
+ e->ip = ngx_http_script_exit;
+ e->status = NGX_HTTP_INTERNAL_SERVER_ERROR;
+ return;
+ }
if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool)
!= NGX_OK)