Remove chmod and link calls

Signed-off-by: Le Yao <le.yao@intel.com>
This commit is contained in:
Le Yao 2021-07-23 02:41:37 -04:00
parent 3dd0ed7979
commit a49249a20c
2 changed files with 2 additions and 4 deletions

View File

@ -79,7 +79,7 @@ git submodule init
git submodule update git submodule update
# Configure ModSecurity with core functions # 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 # Build the library
emmake make -j <num_cpus> emmake make -j <num_cpus>

View File

@ -45,7 +45,7 @@ MultipartPartTmpFile::~MultipartPartTmpFile() {
Close(); Close();
} }
const int unlink_rc = unlink(m_tmp_file_name.c_str()); const int unlink_rc = 0;
if (unlink_rc < 0) { if (unlink_rc < 0) {
ms_dbg_a(m_transaction, 1, "Multipart: Failed to delete file (part) \"" \ ms_dbg_a(m_transaction, 1, "Multipart: Failed to delete file (part) \"" \
+ m_tmp_file_name + "\" because " \ + m_tmp_file_name + "\" because " \
@ -81,9 +81,7 @@ void MultipartPartTmpFile::Open() {
int mode = m_transaction->m_rules->m_uploadFileMode.m_value; int mode = m_transaction->m_rules->m_uploadFileMode.m_value;
if ((m_tmp_file_fd != -1) && (mode != 0)) { if ((m_tmp_file_fd != -1) && (mode != 0)) {
if (fchmod(m_tmp_file_fd, mode) == -1) {
m_tmp_file_fd = -1; m_tmp_file_fd = -1;
}
} }
} }