mirror of
https://github.com/openappsec/openappsec.git
synced 2025-11-17 17:55:28 +03:00
Compare commits
7 Commits
Jul_06_202
...
support-ad
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7cb494e2b | ||
|
|
08583fdb4c | ||
|
|
e5ef6c5ad4 | ||
|
|
3c24666643 | ||
|
|
19e8906704 | ||
|
|
ebc2b2be0d | ||
|
|
fc6355a3b2 |
36
core/include/services_sdk/resources/log_utils.h
Normal file
36
core/include/services_sdk/resources/log_utils.h
Normal 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__
|
||||||
@@ -3,5 +3,5 @@ link_directories(${BOOST_ROOT}/lib)
|
|||||||
|
|
||||||
add_unit_test(
|
add_unit_test(
|
||||||
intelligence_is_v2_ut
|
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")
|
"intelligence_is_v2;singleton;shell_cmd;event_is;metric;message;agent_details;connkey;-lboost_regex")
|
||||||
|
|||||||
@@ -87,6 +87,12 @@ install_waap()
|
|||||||
cp_exec "cp -f resources/cp-csrf.js /etc/cp/conf/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-ab.js"
|
||||||
cp_exec "chmod 777 /etc/cp/conf/waap/cp-csrf.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()
|
set_debug_configuration()
|
||||||
|
|||||||
@@ -224,8 +224,8 @@ fi
|
|||||||
if [ -n "${SPLIT_DIR}" ]; then
|
if [ -n "${SPLIT_DIR}" ]; then
|
||||||
mkdir -p "$SPLIT_DIR"
|
mkdir -p "$SPLIT_DIR"
|
||||||
unsplited_tar="${CP_UNSPLITED_DIR}/agent-info.tar.gz"
|
unsplited_tar="${CP_UNSPLITED_DIR}/agent-info.tar.gz"
|
||||||
if [ "$IS_SMB" != "1" ]; then
|
if [ `tar --help | grep absolute-names | wc -l` = "1" ]; then
|
||||||
TAR_EXTRA_PARAMS="-P"
|
TAR_EXTRA_PARAMS="--absolute-names"
|
||||||
else
|
else
|
||||||
TAR_EXTRA_PARAMS=""
|
TAR_EXTRA_PARAMS=""
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user