Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-03-31Fixed logging in close error handling.Sergey Kandaurov
2015-08-11Fixed typo in the error message.Andrei Belov
2013-09-02Disable symlinks: removed recursive call of ngx_file_o_path_info().Valentin Bartenev
It is surplus.
2013-09-02Disable symlinks: use O_PATH to open path components.Valentin Bartenev
It was introduced in Linux 2.6.39, glibc 2.14 and allows to obtain file descriptors without actually opening files. Thus made it possible to traverse path with openat() syscalls without the need to have read permissions for path components. It is effectively emulates O_SEARCH which is missing on Linux. O_PATH is used in combination with O_RDONLY. The last one is ignored if O_PATH is used, but it allows nginx to not fail when it was built on modern system (i.e. glibc 2.14+) and run with a kernel older than 2.6.39. Then O_PATH is unknown to the kernel and ignored, while O_RDONLY is used. Sadly, fstat() is not working with O_PATH descriptors till Linux 3.6. As a workaround we fallback to fstatat() with the AT_EMPTY_PATH flag that was introduced at the same time as O_PATH.
2013-08-20Format specifier fixes in error logging.Sergey Kandaurov
2012-02-28Fix of rbtree lookup on hash collisions.Maxim Dounin
Previous code incorrectly assumed that nodes with identical keys are linked together. This might not be true after tree rebalance. Patch by Lanshun Zhou.
2012-02-27Disable symlinks: added the "from" parameter support to the open file cache.Valentin Bartenev
2012-02-21Disable symlinks: use O_SEARCH|O_DIRECTORY to open path components.Valentin Bartenev
2012-02-21Disable symlinks: don't allow creating or truncating a file via a symlink inValentin Bartenev
the last path component if "if_not_owner" parameter is used. To prevent race condition we have to open a file before checking its owner and there's no way to change access flags for already opened file descriptor, so we disable symlinks for the last path component at all if flags allow creating or truncating the file.
2012-02-21Disable symlinks: cleanups once again.Valentin Bartenev
In collaboration with Ruslan Ermilov.
2012-02-20Disable symlinks: added explicit cast of AT_FDCWD (ticket #111).Maxim Dounin
Solaris has AT_FDCWD defined to unsigned value, and comparison of a file descriptor with it causes warnings in modern versions of gcc. Explicitly cast AT_FDCWD to ngx_fd_t to resolve these warnings.
2012-02-20Disable symlinks: error handling cleanup again.Maxim Dounin
2012-02-15Disable symlinks: fixed edge cases of path handling.Maxim Dounin
This includes non-absolute pathnames, multiple slashes and trailing slashes. In collaboration with Valentin Bartenev.
2012-02-15Disable symlinks: cleanup error handling.Maxim Dounin
Notably this fixes NGX_INVALID_FILE/NGX_FILE_ERROR mess, and adds logging of close() errors. In collaboration with Valentin Bartenev.
2012-02-13Added disable_symlinks directive.Andrey Belov
To completely disable symlinks (disable_symlinks on) we use openat(O_NOFOLLOW) for each path component to avoid races. To allow symlinks with the same owner (disable_symlinks if_not_owner), use openat() (followed by fstat()) and fstatat(AT_SYMLINK_NOFOLLOW), and then compare uids between fstat() and fstatat(). As there is a race between openat() and fstatat() we don't know if openat() in fact opened symlink or not. Therefore, we have to compare uids even if fstatat() reports the opened component isn't a symlink (as we don't know whether it was symlink during openat() or not). Default value is off, i.e. symlinks are allowed.
2012-02-13Changed ngx_open_and_stat_file() to use ngx_str_t.Andrey Belov
No functional changes.
2012-01-18Copyright updated.Maxim Konovalov
2011-09-14Fix of the previous commit: is_directio flag processing introduced in r4077Igor Sysoev
is still worthwhile.
2011-09-14Bugfix: open_file_cache did not update file info on retest.Igor Sysoev
If file inode was not changed, cached file information was not updated on retest. As a result stale information might be cached forever if file attributes was changed and/or file was extended. This fix also makes obsolete r4077 change of is_directio flag handling, since this flag is updated together with other file information.
2011-09-05Bugfix: open_file_cache lost is_directio flag.Maxim Dounin
On file retest open_file_cache lost is_directio if file wasn't changed. This caused unaligned operations under Linux to fail with EINVAL. It wasn't noticeable with AIO though, as errors wasn't properly logged.
2011-04-22Use more precise stat.st_blocks to account cache size on UnixIgor Sysoev
instead of file length rounded to a file system block size. There is no similar way on Windows, so rounding to a cache->bsize is kept.
2010-04-21use non-blocking open() not to hang on FIFO files, etc.Igor Sysoev
2009-09-30read_aheadIgor Sysoev
2009-09-25uniform ngx_directio_on/off() interface with other file functionsIgor Sysoev
2009-06-12initialize use_event field in open file cacheIgor Sysoev
the bug had been introduced in r2071
2009-04-30set of.failed for cached error, the bug has been introduced in r2757Igor Sysoev
2009-04-29uniform ngx_file_info() interface with ngx_fd_info()Igor Sysoev
2009-04-27*) of.test_only to not open file if only stat() is enoughIgor Sysoev
*) of.failed to return exact name of failed syscall
2009-03-31Win32 appends synchronized if only FILE_APPEND_DATA and SYNCHRONIZE are setIgor Sysoev
without any other flags. On the other hand, Unix requires at least the write flag to be set together with O_APPEND.
2009-03-30win32 ngx_open_file() supports utf8 names and NGX_FILE_APPENDIgor Sysoev
2009-01-21test ngx_file_info() result, the bug has been introduced in r2070Igor Sysoev
2008-09-12cache directio flag in open file cacheIgor Sysoev
2008-09-05*) handle unaligned file part for directioIgor Sysoev
*) disable sendfile in directio mode
2008-07-30directioIgor Sysoev
2008-06-30variables in access_logIgor Sysoev
2008-06-30fix commentIgor Sysoev
2008-06-30fix the previous commitIgor Sysoev
2008-06-26use ngx_file_info() and test uniq if file is already openIgor Sysoev
2008-06-23initialize of.uniq in ngx_open_cached_file()Igor Sysoev
2008-05-14style fix: remove tabs and trailing spacesIgor Sysoev
2008-04-29fix segfault when file is deleted and open_file_cache_errors is offIgor Sysoev
2008-04-29back out the previous commitIgor Sysoev
2008-04-29fix segfault when file is deleted and open_file_cache_errors is offIgor Sysoev
2008-03-13fix the previous commitIgor Sysoev
2008-03-13fix case when errors are not cached,Igor Sysoev
and a file was not used often enough to keep open and it has been removed before it was kept open
2008-03-13axe useless codeIgor Sysoev
2007-12-25several fixes:Igor Sysoev
*) do not add event if file was used less than min_uses *) do not rely upon event to avoid race conditions *) ngx_open_file_lookup()
2007-12-22open_file_cache_min_usesIgor Sysoev
2007-12-21open_file_cache_retest > open_file_cache_validIgor Sysoev
2007-12-21fix the previous commitIgor Sysoev