mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Moves system related functions from utils' to
utils/system'
This commit is contained in:
@@ -57,6 +57,7 @@ class Driver;
|
||||
#include "utils.h"
|
||||
#include "utils/geo_lookup.h"
|
||||
#include "utils/msc_string.h"
|
||||
#include "utils/msc_system.h"
|
||||
#include "variables/xml.h"
|
||||
#include "variables/duration.h"
|
||||
#include "variables/env.h"
|
||||
@@ -661,7 +662,8 @@ expression:
|
||||
| CONFIG_DIR_GEO_DB
|
||||
{
|
||||
#ifdef WITH_GEOIP
|
||||
std::string file = modsecurity::find_resource($1, driver.ref.back());
|
||||
std::string file = modsecurity::utils::find_resource($1,
|
||||
driver.ref.back());
|
||||
if (GeoLookup::getInstance().setDataBase(file) == false) {
|
||||
std::stringstream ss;
|
||||
ss << "Failed to load the GeoDB from: ";
|
||||
|
@@ -398,8 +398,8 @@ VAR_FREE_TEXT_SPACE_COMMA [^, \t\"]+
|
||||
|
||||
{CONFIG_INCLUDE}[ ]{CONFIG_VALUE_PATH} {
|
||||
const char *file = strchr(yytext, ' ') + 1;
|
||||
for (auto& s: modsecurity::expandEnv(file, 0)) {
|
||||
std::string f = modsecurity::find_resource(s, driver.ref.back());
|
||||
for (auto& s: modsecurity::utils::expandEnv(file, 0)) {
|
||||
std::string f = modsecurity::utils::find_resource(s, driver.ref.back());
|
||||
yyin = fopen(f.c_str(), "r" );
|
||||
if (!yyin) {
|
||||
BEGIN(INITIAL);
|
||||
@@ -416,8 +416,8 @@ VAR_FREE_TEXT_SPACE_COMMA [^, \t\"]+
|
||||
const char *file = strchr(yytext, ' ') + 1;
|
||||
char *f = strdup(file + 1);
|
||||
f[strlen(f)-1] = '\0';
|
||||
for (auto& s: modsecurity::expandEnv(f, 0)) {
|
||||
std::string f = modsecurity::find_resource(s, driver.ref.back());
|
||||
for (auto& s: modsecurity::utils::expandEnv(f, 0)) {
|
||||
std::string f = modsecurity::utils::find_resource(s, driver.ref.back());
|
||||
yyin = fopen(f.c_str(), "r" );
|
||||
if (!yyin) {
|
||||
BEGIN(INITIAL);
|
||||
|
Reference in New Issue
Block a user