Compare commits

...
3 Commits
Author SHA1 Message Date
Hakase a16ff4bf79 Update submodule 2018-08-01 15:35:34 +09:00
Hakase 780042651e Latest update - 7330 2018-08-01 15:34:32 +09:00
Hakase 0078c8e58c Not needed 64bit openssl build 2018-07-28 18:11:46 +09:00
4 changed files with 16 additions and 15 deletions
+1 -3
View File
@@ -71,12 +71,10 @@ fi
### x86, x64 Check (Configuration) ### x86, x64 Check (Configuration)
if [ "$BITCHK" = 64 ]; then if [ "$BITCHK" = 64 ]; then
BUILD_BIT="-m64 " BUILD_BIT="-m64 "
BUILD_OPENSSL="enable-ec_nistp_64_gcc_128 "
BUILD_ZLIB="./lib/zlib" BUILD_ZLIB="./lib/zlib"
BUILD_LD="-lrt -ljemalloc -Wl,-z,relro -Wl,-z,now -fPIC" BUILD_LD="-lrt -ljemalloc -Wl,-z,relro -Wl,-z,now -fPIC"
else else
BUILD_BIT="" BUILD_BIT=""
BUILD_OPENSSL=""
BUILD_ZLIB="./lib/zlib_x86" BUILD_ZLIB="./lib/zlib_x86"
BUILD_LD="" BUILD_LD=""
fi fi
@@ -100,7 +98,7 @@ if [ "$FANCYINDEX" = 1 ]; then BUILD_MODULES="${BUILD_MODULES} --add-module=./li
auto/configure \ auto/configure \
--with-cc-opt="-DTCP_FASTOPEN=23 ${BUILD_BIT}${BUILD_LTO} -g -O3 -march=native -fstack-protector-strong -fuse-ld=gold -fuse-linker-plugin --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wno-strict-aliasing -Wp,-D_FORTIFY_SOURCE=2 -gsplit-dwarf -DNGX_HTTP_HEADERS" \ --with-cc-opt="-DTCP_FASTOPEN=23 ${BUILD_BIT}${BUILD_LTO} -g -O3 -march=native -fstack-protector-strong -fuse-ld=gold -fuse-linker-plugin --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wno-strict-aliasing -Wp,-D_FORTIFY_SOURCE=2 -gsplit-dwarf -DNGX_HTTP_HEADERS" \
--with-ld-opt="${BUILD_LD} ${BUILD_LTO}" \ --with-ld-opt="${BUILD_LD} ${BUILD_LTO}" \
--with-openssl-opt="enable-tls13downgrade ${BUILD_OPENSSL}enable-weak-ssl-ciphers no-ssl3-method -march=native -ljemalloc ${BUILD_OPENSSL_LTO}" \ --with-openssl-opt="enable-tls13downgrade enable-weak-ssl-ciphers no-ssl3-method -march=native -ljemalloc ${BUILD_OPENSSL_LTO}" \
--builddir=objs --prefix=${NGX_PREFIX} \ --builddir=objs --prefix=${NGX_PREFIX} \
--conf-path=${NGX_CONF} \ --conf-path=${NGX_CONF} \
--pid-path=${NGX_PID} \ --pid-path=${NGX_PID} \
+13 -10
View File
@@ -796,10 +796,12 @@ ngx_copy_file(u_char *from, u_char *to, ngx_copy_file_t *cf)
{ {
char *buf; char *buf;
off_t size; off_t size;
time_t time;
size_t len; size_t len;
ssize_t n; ssize_t n;
ngx_fd_t fd, nfd; ngx_fd_t fd, nfd;
ngx_int_t rc; ngx_int_t rc;
ngx_uint_t access;
ngx_file_info_t fi; ngx_file_info_t fi;
rc = NGX_ERROR; rc = NGX_ERROR;
@@ -814,8 +816,10 @@ ngx_copy_file(u_char *from, u_char *to, ngx_copy_file_t *cf)
goto failed; goto failed;
} }
if (cf->size != -1) { if (cf->size != -1 && cf->access != 0 && cf->time != -1) {
size = cf->size; size = cf->size;
access = cf->access;
time = cf->time;
} else { } else {
if (ngx_fd_info(fd, &fi) == NGX_FILE_ERROR) { if (ngx_fd_info(fd, &fi) == NGX_FILE_ERROR) {
@@ -825,7 +829,9 @@ ngx_copy_file(u_char *from, u_char *to, ngx_copy_file_t *cf)
goto failed; goto failed;
} }
size = ngx_file_size(&fi); size = (cf->size != -1) ? cf->size : ngx_file_size(&fi);
access = cf->access ? cf->access : ngx_file_access(&fi);
time = (cf->time != -1) ? cf->time : ngx_file_mtime(&fi);
} }
len = cf->buf_size ? cf->buf_size : 65536; len = cf->buf_size ? cf->buf_size : 65536;
@@ -839,8 +845,7 @@ ngx_copy_file(u_char *from, u_char *to, ngx_copy_file_t *cf)
goto failed; goto failed;
} }
nfd = ngx_open_file(to, NGX_FILE_WRONLY, NGX_FILE_CREATE_OR_OPEN, nfd = ngx_open_file(to, NGX_FILE_WRONLY, NGX_FILE_TRUNCATE, access);
cf->access);
if (nfd == NGX_INVALID_FILE) { if (nfd == NGX_INVALID_FILE) {
ngx_log_error(NGX_LOG_CRIT, cf->log, ngx_errno, ngx_log_error(NGX_LOG_CRIT, cf->log, ngx_errno,
@@ -887,12 +892,10 @@ ngx_copy_file(u_char *from, u_char *to, ngx_copy_file_t *cf)
size -= n; size -= n;
} }
if (cf->time != -1) { if (ngx_set_file_time(to, nfd, time) != NGX_OK) {
if (ngx_set_file_time(to, nfd, cf->time) != NGX_OK) { ngx_log_error(NGX_LOG_ALERT, cf->log, ngx_errno,
ngx_log_error(NGX_LOG_ALERT, cf->log, ngx_errno, ngx_set_file_time_n " \"%s\" failed", to);
ngx_set_file_time_n " \"%s\" failed", to); goto failed;
goto failed;
}
} }
rc = NGX_OK; rc = NGX_OK;
+1 -1
View File
@@ -845,7 +845,7 @@ overwrite_done:
cf.size = ngx_file_size(&fi); cf.size = ngx_file_size(&fi);
cf.buf_size = 0; cf.buf_size = 0;
cf.access = dlcf->access; cf.access = ngx_file_access(&fi);
cf.time = ngx_file_mtime(&fi); cf.time = ngx_file_mtime(&fi);
cf.log = r->connection->log; cf.log = r->connection->log;