From 0e05ca0404b6ef99fd809c6a1c362c6ef923cca6 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Mon, 27 Feb 2012 16:51:28 +0000 Subject: 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. --- src/http/modules/perl/nginx.xs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/http/modules/perl') diff --git a/src/http/modules/perl/nginx.xs b/src/http/modules/perl/nginx.xs index 8def03eb1..ecd11ffbc 100644 --- a/src/http/modules/perl/nginx.xs +++ b/src/http/modules/perl/nginx.xs @@ -662,9 +662,10 @@ sendfile(r, filename, offset = -1, bytes = 0) 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_http_set_disable_symlinks(r, clcf, &path, &of) != NGX_OK) { + XSRETURN_EMPTY; + } if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool) != NGX_OK) -- cgit