Welcome! Log In Create A New Profile

Advanced

[nginx] Fixed calls to ngx_open_file() in certain places.

Sergey Kandaurov
August 09, 2017 08:08AM
details: http://hg.nginx.org/nginx/rev/47b7ffc3339d
branches:
changeset: 7087:47b7ffc3339d
user: Sergey Kandaurov <pluknet@nginx.com>
date: Wed Aug 09 15:03:27 2017 +0300
description:
Fixed calls to ngx_open_file() in certain places.

Pass NGX_FILE_OPEN to ngx_open_file() to fix "The parameter is incorrect"
error on win32 when using the ssl_session_ticket_key directive or loading
a binary geo base. On UNIX, this change is a no-op.

diffstat:

src/event/ngx_event_openssl.c | 3 ++-
src/http/modules/ngx_http_geo_module.c | 2 +-
src/stream/ngx_stream_geo_module.c | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)

diffs (37 lines):

diff -r 577628e6b6a6 -r 47b7ffc3339d src/event/ngx_event_openssl.c
--- a/src/event/ngx_event_openssl.c Wed Aug 09 14:59:46 2017 +0300
+++ b/src/event/ngx_event_openssl.c Wed Aug 09 15:03:27 2017 +0300
@@ -2906,7 +2906,8 @@ ngx_ssl_session_ticket_keys(ngx_conf_t *
file.name = path[i];
file.log = cf->log;

- file.fd = ngx_open_file(file.name.data, NGX_FILE_RDONLY, 0, 0);
+ file.fd = ngx_open_file(file.name.data, NGX_FILE_RDONLY,
+ NGX_FILE_OPEN, 0);

if (file.fd == NGX_INVALID_FILE) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno,
diff -r 577628e6b6a6 -r 47b7ffc3339d src/http/modules/ngx_http_geo_module.c
--- a/src/http/modules/ngx_http_geo_module.c Wed Aug 09 14:59:46 2017 +0300
+++ b/src/http/modules/ngx_http_geo_module.c Wed Aug 09 15:03:27 2017 +0300
@@ -1400,7 +1400,7 @@ ngx_http_geo_include_binary_base(ngx_con
file.name = *name;
file.log = cf->log;

- file.fd = ngx_open_file(name->data, NGX_FILE_RDONLY, 0, 0);
+ file.fd = ngx_open_file(name->data, NGX_FILE_RDONLY, NGX_FILE_OPEN, 0);

if (file.fd == NGX_INVALID_FILE) {
err = ngx_errno;
diff -r 577628e6b6a6 -r 47b7ffc3339d src/stream/ngx_stream_geo_module.c
--- a/src/stream/ngx_stream_geo_module.c Wed Aug 09 14:59:46 2017 +0300
+++ b/src/stream/ngx_stream_geo_module.c Wed Aug 09 15:03:27 2017 +0300
@@ -1326,7 +1326,7 @@ ngx_stream_geo_include_binary_base(ngx_c
file.name = *name;
file.log = cf->log;

- file.fd = ngx_open_file(name->data, NGX_FILE_RDONLY, 0, 0);
+ file.fd = ngx_open_file(name->data, NGX_FILE_RDONLY, NGX_FILE_OPEN, 0);

if (file.fd == NGX_INVALID_FILE) {
err = ngx_errno;
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Fixed calls to ngx_open_file() in certain places.

Sergey Kandaurov 629 August 09, 2017 08:08AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 311
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready