From a49249a20ccc23f8177f7ffdc6837098e1a5d5d4 Mon Sep 17 00:00:00 2001 From: Le Yao Date: Fri, 23 Jul 2021 02:41:37 -0400 Subject: [PATCH] Remove chmod and link calls Signed-off-by: Le Yao --- modsecurity2wasm.md | 2 +- src/request_body_processor/multipart.cc | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/modsecurity2wasm.md b/modsecurity2wasm.md index 800b2414..3133c776 100644 --- a/modsecurity2wasm.md +++ b/modsecurity2wasm.md @@ -79,7 +79,7 @@ git submodule init git submodule update # Configure ModSecurity with core functions -emconfigure ./configure --without-yajl --without-geoip --without-libxml --without-curl --disable-shared --disable-examples --disable-libtool-lock --disable-debug-logs --disable-mutex-on-pm --without-lmdb --without-maxmind --without-ssdeep with-pcre=./pcre-config +emconfigure ./configure --without-yajl --without-geoip --without-libxml --without-curl --without-lua --disable-shared --disable-examples --disable-libtool-lock --disable-debug-logs --disable-mutex-on-pm --without-lmdb --without-maxmind --without-ssdeep --with-pcre=./pcre-config # Build the library emmake make -j diff --git a/src/request_body_processor/multipart.cc b/src/request_body_processor/multipart.cc index e09ba320..8da9b33d 100644 --- a/src/request_body_processor/multipart.cc +++ b/src/request_body_processor/multipart.cc @@ -45,7 +45,7 @@ MultipartPartTmpFile::~MultipartPartTmpFile() { Close(); } - const int unlink_rc = unlink(m_tmp_file_name.c_str()); + const int unlink_rc = 0; if (unlink_rc < 0) { ms_dbg_a(m_transaction, 1, "Multipart: Failed to delete file (part) \"" \ + m_tmp_file_name + "\" because " \ @@ -81,9 +81,7 @@ void MultipartPartTmpFile::Open() { int mode = m_transaction->m_rules->m_uploadFileMode.m_value; if ((m_tmp_file_fd != -1) && (mode != 0)) { - if (fchmod(m_tmp_file_fd, mode) == -1) { m_tmp_file_fd = -1; - } } }