comparison src/http/ngx_http_script.c @ 4494:13e09cf11d4e

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.
author Valentin Bartenev <vbart@nginx.com>
date Mon, 27 Feb 2012 16:51:28 +0000
parents 08713bac87fc
children 972642646f06
comparison
equal deleted inserted replaced
4493:47ece8818978 4494:13e09cf11d4e
1503 of.valid = clcf->open_file_cache_valid; 1503 of.valid = clcf->open_file_cache_valid;
1504 of.min_uses = clcf->open_file_cache_min_uses; 1504 of.min_uses = clcf->open_file_cache_min_uses;
1505 of.test_only = 1; 1505 of.test_only = 1;
1506 of.errors = clcf->open_file_cache_errors; 1506 of.errors = clcf->open_file_cache_errors;
1507 of.events = clcf->open_file_cache_events; 1507 of.events = clcf->open_file_cache_events;
1508 #if (NGX_HAVE_OPENAT) 1508
1509 of.disable_symlinks = clcf->disable_symlinks; 1509 if (ngx_http_set_disable_symlinks(r, clcf, &path, &of) != NGX_OK) {
1510 #endif 1510 e->ip = ngx_http_script_exit;
1511 e->status = NGX_HTTP_INTERNAL_SERVER_ERROR;
1512 return;
1513 }
1511 1514
1512 if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool) 1515 if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool)
1513 != NGX_OK) 1516 != NGX_OK)
1514 { 1517 {
1515 if (of.err != NGX_ENOENT 1518 if (of.err != NGX_ENOENT