Compare commits

...

7 Commits

Author SHA1 Message Date
roybarda
c7cb494e2b support-advanced-model in all flavors 2023-07-25 10:06:48 +03:00
Ned Wright
08583fdb4c Create log_utils.h 2023-07-19 11:22:06 +00:00
Ned Wright
e5ef6c5ad4 Create log_utils.h 2023-07-19 11:16:19 +00:00
WrightNed
3c24666643 Update CMakeLists.txt 2023-07-19 14:03:40 +03:00
WrightNed
19e8906704 Merge pull request #37 from openappsec/Jul_06_2023-Dev
Jul 06 2023 dev
2023-07-16 15:53:39 +03:00
WrightNed
ebc2b2be0d Merge pull request #36 from openappsec/WrightNed-patch-1
Update cp-agent-info.sh
2023-07-12 19:04:46 +03:00
WrightNed
fc6355a3b2 Update cp-agent-info.sh
Better checks which tar options exists
2023-07-12 18:02:52 +03:00
4 changed files with 45 additions and 3 deletions

View File

@@ -0,0 +1,36 @@
// Copyright (C) 2022 Check Point Software Technologies Ltd. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License");
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef __LOG_UTILS_H__
#define __LOG_UTILS_H__
#include <sstream>
#include "log_generator.h"
template <ReportIS::Tags tag>
struct ErrorCode
{
template <typename CastableToUInt>
static LogField logError(CastableToUInt val) { return logError(static_cast<uint>(val)); }
static LogField
logError(uint val)
{
std::stringstream code;
code << std::setw(3) << std::setfill('0') << static_cast<uint>(tag) << '-' << std::setw(4) << val;
return LogField("eventCode", code.str());
}
};
#endif // __LOG_UTILS_H__

View File

@@ -3,5 +3,5 @@ link_directories(${BOOST_ROOT}/lib)
add_unit_test(
intelligence_is_v2_ut
"query_request_v2_ut.cc;query_response_v2_ut.cc;intelligence_comp_v2_ut.cc;invalidation_ut.cc"
"query_request_v2_ut.cc;query_response_v2_ut.cc;intelligence_comp_v2_ut.cc"
"intelligence_is_v2;singleton;shell_cmd;event_is;metric;message;agent_details;connkey;-lboost_regex")

View File

@@ -87,6 +87,12 @@ install_waap()
cp_exec "cp -f resources/cp-csrf.js /etc/cp/conf/waap/"
cp_exec "chmod 777 /etc/cp/conf/waap/cp-ab.js"
cp_exec "chmod 777 /etc/cp/conf/waap/cp-csrf.js"
# use advanced model if exist as data for waap
ADVANCED_MODEL_FILE=/advanced-model/open-appsec-advanced-model.tgz
if [ -f "$ADVANCED_MODEL_FILE" ]; then
cp_exec "tar -xzf $ADVANCED_MODEL_FILE -C /etc/cp/conf/waap"
fi
}
set_debug_configuration()

View File

@@ -224,8 +224,8 @@ fi
if [ -n "${SPLIT_DIR}" ]; then
mkdir -p "$SPLIT_DIR"
unsplited_tar="${CP_UNSPLITED_DIR}/agent-info.tar.gz"
if [ "$IS_SMB" != "1" ]; then
TAR_EXTRA_PARAMS="-P"
if [ `tar --help | grep absolute-names | wc -l` = "1" ]; then
TAR_EXTRA_PARAMS="--absolute-names"
else
TAR_EXTRA_PARAMS=""
fi