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.
diff --git a/src/http/ngx_http_script.c b/src/http/ngx_http_script.c
index a8f193a..ce290f4 100644
--- a/src/http/ngx_http_script.c
+++ b/src/http/ngx_http_script.c
@@ -1505,9 +1505,12 @@
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)