Moves system related functions from utils' to utils/system'

This commit is contained in:
Felipe Zimmerle
2016-11-03 09:42:21 -03:00
parent 73c4d69174
commit f1e742c159
14 changed files with 193 additions and 102 deletions

View File

@@ -20,6 +20,7 @@
#include "operators/operator.h"
#include "utils/https_client.h"
#include "src/utils.h"
#include "src/utils/msc_system.h"
namespace modsecurity {
namespace operators {
@@ -37,7 +38,7 @@ bool PmFromFile::init(const std::string &config, std::string *error) {
}
iss = new std::stringstream(client.content);
} else {
std::string resource = find_resource(m_param, config);
std::string resource = utils::find_resource(m_param, config);
iss = new std::ifstream(resource, std::ios::in);
if (((std::ifstream *)iss)->is_open() == false) {

View File

@@ -19,6 +19,7 @@
#include "request_body_processor/xml.h"
#include "src/utils.h"
#include "src/utils/msc_system.h"
#include "operators/operator.h"
namespace modsecurity {
@@ -26,7 +27,7 @@ namespace operators {
bool ValidateDTD::init(const std::string &file, std::string *error) {
m_resource = find_resource(m_param, file);
m_resource = utils::find_resource(m_param, file);
if (m_resource == "") {
error->assign("XML: File not found: " + m_param + ".");
return false;

View File

@@ -19,14 +19,14 @@
#include "operators/operator.h"
#include "request_body_processor/xml.h"
#include "src/utils.h"
#include "src/utils/msc_system.h"
namespace modsecurity {
namespace operators {
bool ValidateSchema::init(const std::string &file, std::string *error) {
m_resource = find_resource(m_param, file);
m_resource = utils::find_resource(m_param, file);
if (m_resource == "") {
error->assign("XML: File not found: " + m_param + ".");
return false;