Skip to content

Commit a49249a

Browse files
author
Le Yao
committed
Remove chmod and link calls
Signed-off-by: Le Yao <le.yao@intel.com>
1 parent 3dd0ed7 commit a49249a

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

modsecurity2wasm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ git submodule init
7979
git submodule update
8080

8181
# Configure ModSecurity with core functions
82-
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
82+
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
8383

8484
# Build the library
8585
emmake make -j <num_cpus>

src/request_body_processor/multipart.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ MultipartPartTmpFile::~MultipartPartTmpFile() {
4545
Close();
4646
}
4747

48-
const int unlink_rc = unlink(m_tmp_file_name.c_str());
48+
const int unlink_rc = 0;
4949
if (unlink_rc < 0) {
5050
ms_dbg_a(m_transaction, 1, "Multipart: Failed to delete file (part) \"" \
5151
+ m_tmp_file_name + "\" because " \
@@ -81,9 +81,7 @@ void MultipartPartTmpFile::Open() {
8181

8282
int mode = m_transaction->m_rules->m_uploadFileMode.m_value;
8383
if ((m_tmp_file_fd != -1) && (mode != 0)) {
84-
if (fchmod(m_tmp_file_fd, mode) == -1) {
8584
m_tmp_file_fd = -1;
86-
}
8785
}
8886
}
8987

0 commit comments

Comments
 (0)