]> git.kaiwu.me - nginx.git/commit
Disable symlinks: don't allow creating or truncating a file via a symlink in
authorValentin Bartenev <vbart@nginx.com>
Tue, 21 Feb 2012 15:04:41 +0000 (15:04 +0000)
committerValentin Bartenev <vbart@nginx.com>
Tue, 21 Feb 2012 15:04:41 +0000 (15:04 +0000)
commit15b3173c5e5108287f5d74126f29854b14c1db94
tree7f0a3b5b3653fec26d89c1167df28545f0370c18
parent8c27e6429aa634091ad07e02bfee91084497549f
Disable symlinks: don't allow creating or truncating a file via a symlink in
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.
src/core/ngx_open_file_cache.c