mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-03-21 18:57:14 +01:00
Merge branch 'development' into pf_import
This commit is contained in:
commit
64661383cc
2
VERSION
2
VERSION
@ -7,7 +7,7 @@ FWB_MICRO_VERSION=0
|
||||
# build number is like "nano" version number. I am incrementing build
|
||||
# number during development cycle
|
||||
#
|
||||
BUILD_NUM="3542"
|
||||
BUILD_NUM="3544"
|
||||
|
||||
VERSION="$FWB_MAJOR_VERSION.$FWB_MINOR_VERSION.$FWB_MICRO_VERSION.$BUILD_NUM"
|
||||
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
#define VERSION "4.3.0.3542"
|
||||
#define VERSION "4.3.0.3544"
|
||||
#define GENERATION "4.3"
|
||||
|
||||
@ -1,3 +1,13 @@
|
||||
2011-05-17 vadim <vadim@netcitadel.com>
|
||||
|
||||
* FWObjectDatabase_tree_ops.cpp (merge): see #2420 "Crash when
|
||||
selecting New Firewall and existing firewall has interface that is
|
||||
locked". Fixed GUI crash that happened on some operations if an
|
||||
object in the tree was locked. For example, if the user locked an
|
||||
interface of one of the firewall objects that then proceeded to
|
||||
create new firewall object, the GUI would crash. The problem was
|
||||
not limited to locking specifically interface objects.
|
||||
|
||||
2011-05-15 vadim <vadim@netcitadel.com>
|
||||
|
||||
* IPTImporter.cpp (pushPolicyRule): see #2411 Implemented import
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
%define name fwbuilder
|
||||
%define version 4.3.0.3542
|
||||
%define version 4.3.0.3544
|
||||
%define release 1
|
||||
|
||||
%if "%_vendor" == "MandrakeSoft"
|
||||
|
||||
@ -4,6 +4,6 @@ Replaces: fwbuilder (<=4.1.1-1), fwbuilder-common, fwbuilder-bsd, fwbuilder-linu
|
||||
Priority: extra
|
||||
Section: checkinstall
|
||||
Maintainer: vadim@fwbuilder.org
|
||||
Version: 4.3.0.3542-1
|
||||
Version: 4.3.0.3544-1
|
||||
Depends: libqt4-gui (>= 4.3.0), libxml2, libxslt1.1, libsnmp | libsnmp15
|
||||
Description: Firewall Builder GUI and policy compilers
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
|
||||
%define name fwbuilder
|
||||
%define version 4.3.0.3542
|
||||
%define version 4.3.0.3544
|
||||
%define release 1
|
||||
|
||||
%if "%_vendor" == "MandrakeSoft"
|
||||
|
||||
@ -101,7 +101,7 @@ macx:LIBS += $$LIBS_FWCOMPILER
|
||||
INCLUDEPATH += ../compiler_lib ../libfwbuilder/src
|
||||
DEPENDPATH += ../compiler_lib ../libfwbuilder/src
|
||||
|
||||
win32:PRE_TARGETDEPS = ../compiler_lib/release/compilerdriver.lib
|
||||
win32:PRE_TARGETDEPS = ../compiler_lib/release/libcompilerdriver.a
|
||||
!win32:PRE_TARGETDEPS = ../compiler_lib/libcompilerdriver.a
|
||||
|
||||
CONFIG += staticlib
|
||||
|
||||
@ -22,28 +22,16 @@ TARGET = fwbedit
|
||||
QMAKE_COPY = ../../install.sh -m 0755 -s
|
||||
}
|
||||
|
||||
!win32:LIBS = ../common/libcommon.a \
|
||||
../import/libimport.a \
|
||||
../parsers/libfwbparser.a \
|
||||
../compiler_lib/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwbuilder/libfwbuilder.a \
|
||||
../libgui/libgui.a \
|
||||
$$ANTLR_LIBS \
|
||||
$$LIBS
|
||||
PRE_TARGETDEPS = ../common/$$BINARY_SUBDIR/libcommon.a \
|
||||
../import/$$BINARY_SUBDIR/libimport.a \
|
||||
../parsers/$$BINARY_SUBDIR/libfwbparser.a \
|
||||
../compiler_lib/$$BINARY_SUBDIR/libcompilerdriver.a \
|
||||
../libgui/$$BINARY_SUBDIR/libgui.a \
|
||||
../libfwbuilder/src/fwcompiler/$$BINARY_SUBDIR/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/$$BINARY_SUBDIR/libfwbuilder.a \
|
||||
|
||||
!win32:PRE_TARGETDEPS = ../common/libcommon.a \
|
||||
../libfwbuilder/src/fwbuilder/libfwbuilder.a
|
||||
LIBS += $$PRE_TARGETDEPS $$ANTLR_LIBS $$LIBS
|
||||
|
||||
win32:CONFIG += console
|
||||
|
||||
win32:LIBS += ../common/release/common.lib \
|
||||
../import/release/import.lib \
|
||||
../parsers/release/fwbparser.lib \
|
||||
../compiler_lib/release/compilerdriver.lib \
|
||||
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
|
||||
../libgui/release/gui.lib \
|
||||
$$ANTLR_LIBS \
|
||||
$$LIBS
|
||||
|
||||
win32:PRE_TARGETDEPS = ../common/release/common.lib \
|
||||
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib
|
||||
|
||||
@ -11,24 +11,17 @@ SOURCES += main.cpp
|
||||
|
||||
# Arrange static libraries before dynamic ones in the linker command
|
||||
# line. libgui goes first
|
||||
win32 {
|
||||
IMPORT_LIB = ../import/release/import.lib
|
||||
FWBPARSER_LIB = ../parsers/release/fwbparser.lib
|
||||
FWTRANSFER_LIB = ../fwtransfer/release/fwtransfer.lib
|
||||
STATIC_LIBS += ../libgui/release/gui.lib
|
||||
}
|
||||
|
||||
!win32 {
|
||||
IMPORT_LIB = ../import/libimport.a
|
||||
FWBPARSER_LIB = ../parsers/libfwbparser.a
|
||||
FWTRANSFER_LIB = ../fwtransfer/libfwtransfer.a
|
||||
STATIC_LIBS += ../libgui/libgui.a
|
||||
}
|
||||
IMPORT_LIB = ../import/$$BINARY_SUBDIR/libimport.a
|
||||
FWBPARSER_LIB = ../parsers/$$BINARY_SUBDIR/libfwbparser.a
|
||||
FWTRANSFER_LIB = ../fwtransfer/$$BINARY_SUBDIR/libfwtransfer.a
|
||||
|
||||
INCLUDEPATH += $$ANTLR_INCLUDEPATH
|
||||
STATIC_LIBS += $$IMPORT_LIB $$FWBPARSER_LIB $$ANTLR_LIBS
|
||||
DEFINES += $$ANTLR_DEFINES
|
||||
|
||||
STATIC_LIBS += ../libgui/$$BINARY_SUBDIR/libgui.a \
|
||||
$$IMPORT_LIB $$FWBPARSER_LIB $$ANTLR_LIBS
|
||||
|
||||
# fwtransfer lib. Add this before adding -lQtDBus to LIBS below
|
||||
STATIC_LIBS += $$FWTRANSFER_LIB
|
||||
contains( HAVE_QTDBUS, 1 ):unix {
|
||||
@ -53,47 +46,17 @@ DEPENDPATH += \
|
||||
../compiler_lib \
|
||||
../libfwbuilder/src
|
||||
|
||||
win32:STATIC_LIBS += \
|
||||
../common/release/common.lib \
|
||||
../iptlib/release/iptlib.lib \
|
||||
../pflib/release/fwbpf.lib \
|
||||
../cisco_lib/release/fwbcisco.lib \
|
||||
../compiler_lib/release/compilerdriver.lib \
|
||||
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
|
||||
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
|
||||
OTHER_LIBS = ../common/$$BINARY_SUBDIR/libcommon.a \
|
||||
../iptlib/$$BINARY_SUBDIR/libiptlib.a \
|
||||
../pflib/$$BINARY_SUBDIR/libfwbpf.a \
|
||||
../cisco_lib/$$BINARY_SUBDIR/libfwbcisco.a \
|
||||
../compiler_lib/$$BINARY_SUBDIR/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/$$BINARY_SUBDIR/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/$$BINARY_SUBDIR/libfwbuilder.a
|
||||
|
||||
!win32:STATIC_LIBS += \
|
||||
../common/libcommon.a \
|
||||
../iptlib/libiptlib.a \
|
||||
../pflib/libfwbpf.a \
|
||||
../cisco_lib/libfwbcisco.a \
|
||||
../compiler_lib/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/libfwbuilder.a \
|
||||
PRE_TARGETDEPS = $$OTHER_LIBS $$IMPORT_LIB $$FWBPARSER_LIB $$ANTLR_LIBS
|
||||
|
||||
win32:PRE_TARGETDEPS = \
|
||||
../libgui/release/gui.lib \
|
||||
../common/release/common.lib \
|
||||
../iptlib/release/iptlib.lib \
|
||||
../pflib/release/fwbpf.lib \
|
||||
../cisco_lib/release/fwbcisco.lib \
|
||||
../compiler_lib/release/compilerdriver.lib \
|
||||
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
|
||||
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib \
|
||||
$$FWBPARSER_LIB \
|
||||
$$IMPORT_LIB
|
||||
|
||||
!win32:PRE_TARGETDEPS = \
|
||||
../libgui/libgui.a \
|
||||
../common/libcommon.a \
|
||||
../iptlib/libiptlib.a \
|
||||
../pflib/libfwbpf.a \
|
||||
../cisco_lib/libfwbcisco.a \
|
||||
../compiler_lib/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwbuilder/libfwbuilder.a \
|
||||
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
|
||||
$$FWBPARSER_LIB \
|
||||
$$IMPORT_LIB
|
||||
STATIC_LIBS += $$OTHER_LIBS
|
||||
|
||||
macx:STATIC_LIBS += -framework \
|
||||
Carbon
|
||||
|
||||
@ -109,6 +109,8 @@ void usage()
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
cout << "Firewall Builder GUI " VERSION << endl << flush;
|
||||
|
||||
filename = "";
|
||||
print_output_file_name = "";
|
||||
fwbdebug = 0;
|
||||
|
||||
@ -38,7 +38,8 @@ HEADERS = QStringListOperators.h \
|
||||
|
||||
CONFIG += staticlib
|
||||
|
||||
INCLUDEPATH += $$ANTLR_INCLUDEPATH ../libfwbuilder/src ../compiler_lib
|
||||
# need to add "." for g++ on mingw
|
||||
INCLUDEPATH += $$ANTLR_INCLUDEPATH ../libfwbuilder/src ../compiler_lib .
|
||||
DEPENDPATH += $$ANTLR_INCLUDEPATH ../libfwbuilder/src ../compiler_lib
|
||||
|
||||
LIBS += $$ANTLR_LIBS
|
||||
|
||||
@ -21,31 +21,13 @@ win32:CONFIG += console
|
||||
INCLUDEPATH += ../cisco_lib ../compiler_lib ../libfwbuilder/src
|
||||
DEPENDPATH += ../cisco_lib ../compiler_lib ../libfwbuilder/src
|
||||
|
||||
win32:LIBS += ../common/release/common.lib \
|
||||
../cisco_lib/release/fwbcisco.lib \
|
||||
../compiler_lib/release/compilerdriver.lib \
|
||||
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
|
||||
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
|
||||
|
||||
!win32:LIBS = ../common/libcommon.a \
|
||||
../cisco_lib/libfwbcisco.a \
|
||||
../compiler_lib/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/libfwbuilder.a \
|
||||
$$LIBS
|
||||
|
||||
win32:PRE_TARGETDEPS = ../common/release/common.lib \
|
||||
../cisco_lib/release/fwbcisco.lib \
|
||||
../compiler_lib/release/compilerdriver.lib \
|
||||
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
|
||||
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
|
||||
|
||||
!win32:PRE_TARGETDEPS = ../common/libcommon.a \
|
||||
../cisco_lib/libfwbcisco.a \
|
||||
../compiler_lib/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/libfwbuilder.a
|
||||
PRE_TARGETDEPS = ../common/$$BINARY_SUBDIR/libcommon.a \
|
||||
../cisco_lib/$$BINARY_SUBDIR/libfwbcisco.a \
|
||||
../compiler_lib/$$BINARY_SUBDIR/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/$$BINARY_SUBDIR/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/$$BINARY_SUBDIR/libfwbuilder.a \
|
||||
|
||||
LIBS += $$PRE_TARGETDEPS $$LIBS
|
||||
|
||||
TARGET = fwb_iosacl
|
||||
|
||||
|
||||
@ -17,29 +17,12 @@ win32:CONFIG += console
|
||||
INCLUDEPATH += ../pflib ../compiler_lib ../libfwbuilder/src
|
||||
DEPENDPATH += ../pflib ../compiler_lib ../libfwbuilder/src
|
||||
|
||||
win32:LIBS += ../common/release/common.lib \
|
||||
../pflib/release/fwbpf.lib \
|
||||
../compiler_lib/release/compilerdriver.lib \
|
||||
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
|
||||
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
|
||||
PRE_TARGETDEPS = ../common/$$BINARY_SUBDIR/libcommon.a \
|
||||
../pflib/$$BINARY_SUBDIR/libfwbpf.a \
|
||||
../compiler_lib/$$BINARY_SUBDIR/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/$$BINARY_SUBDIR/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/$$BINARY_SUBDIR/libfwbuilder.a \
|
||||
|
||||
!win32:LIBS = ../common/libcommon.a \
|
||||
../pflib/libfwbpf.a \
|
||||
../compiler_lib/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/libfwbuilder.a \
|
||||
$$LIBS
|
||||
|
||||
win32:PRE_TARGETDEPS = ../common/release/common.lib \
|
||||
../pflib/release/fwbpf.lib \
|
||||
../compiler_lib/release/compilerdriver.lib \
|
||||
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
|
||||
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
|
||||
|
||||
!win32:PRE_TARGETDEPS = ../common/libcommon.a \
|
||||
../pflib/libfwbpf.a \
|
||||
../compiler_lib/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/libfwbuilder.a
|
||||
LIBS += $$PRE_TARGETDEPS $$LIBS
|
||||
|
||||
TARGET = fwb_ipf
|
||||
|
||||
@ -15,30 +15,12 @@ win32:CONFIG += console
|
||||
INCLUDEPATH += ../pflib ../compiler_lib ../libfwbuilder/src
|
||||
DEPENDPATH += ../pflib ../compiler_lib ../libfwbuilder/src
|
||||
|
||||
win32:LIBS += ../common/release/common.lib \
|
||||
../pflib/release/fwbpf.lib \
|
||||
../compiler_lib/release/compilerdriver.lib \
|
||||
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
|
||||
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
|
||||
|
||||
!win32:LIBS = ../common/libcommon.a \
|
||||
../pflib/libfwbpf.a \
|
||||
../compiler_lib/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/libfwbuilder.a \
|
||||
$$LIBS
|
||||
|
||||
win32:PRE_TARGETDEPS = ../common/release/common.lib \
|
||||
../pflib/release/fwbpf.lib \
|
||||
../compiler_lib/release/compilerdriver.lib \
|
||||
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
|
||||
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
|
||||
|
||||
!win32:PRE_TARGETDEPS = ../common/libcommon.a \
|
||||
../pflib/libfwbpf.a \
|
||||
../compiler_lib/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/libfwbuilder.a
|
||||
PRE_TARGETDEPS = ../common/$$BINARY_SUBDIR/libcommon.a \
|
||||
../pflib/$$BINARY_SUBDIR/libfwbpf.a \
|
||||
../compiler_lib/$$BINARY_SUBDIR/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/$$BINARY_SUBDIR/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/$$BINARY_SUBDIR/libfwbuilder.a \
|
||||
|
||||
LIBS += $$PRE_TARGETDEPS $$LIBS
|
||||
|
||||
TARGET = fwb_ipfw
|
||||
|
||||
@ -43,6 +43,8 @@
|
||||
#include <QApplication>
|
||||
#include <QStringList>
|
||||
#include <QTextCodec>
|
||||
#include <QTime>
|
||||
|
||||
|
||||
#include "../common/init.cpp"
|
||||
|
||||
@ -76,6 +78,9 @@ int main(int argc, char **argv)
|
||||
{
|
||||
QApplication app(argc, argv, false);
|
||||
|
||||
QTime total_time_timer;
|
||||
total_time_timer.start();
|
||||
|
||||
// compilers always write file names into manifest in Utf8
|
||||
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("Utf8"));
|
||||
QTextCodec::setCodecForLocale(QTextCodec::codecForName("Utf8"));
|
||||
@ -153,6 +158,10 @@ int main(int argc, char **argv)
|
||||
driver->compile();
|
||||
int ret = (driver->getStatus() == BaseCompiler::FWCOMPILER_SUCCESS) ? 0 : 1;
|
||||
|
||||
QTime time_spent = QTime().addMSecs(total_time_timer.elapsed());
|
||||
cerr << "Compile time: "
|
||||
<< time_spent.toString("hh:mm:ss").toStdString() << endl;
|
||||
|
||||
delete driver;
|
||||
delete objdb;
|
||||
|
||||
|
||||
@ -15,30 +15,13 @@ win32: CONFIG += console
|
||||
INCLUDEPATH += ../iptlib ../compiler_lib ../libfwbuilder/src
|
||||
DEPENDPATH += ../iptlib ../compiler_lib ../libfwbuilder/src
|
||||
|
||||
win32:LIBS += ../common/release/common.lib \
|
||||
../iptlib/release/iptlib.lib \
|
||||
../compiler_lib/release/compilerdriver.lib \
|
||||
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
|
||||
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
|
||||
PRE_TARGETDEPS = ../common/$$BINARY_SUBDIR/libcommon.a \
|
||||
../iptlib/$$BINARY_SUBDIR/libiptlib.a \
|
||||
../compiler_lib/$$BINARY_SUBDIR/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/$$BINARY_SUBDIR/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/$$BINARY_SUBDIR/libfwbuilder.a \
|
||||
|
||||
!win32:LIBS = ../common/libcommon.a \
|
||||
../iptlib/libiptlib.a \
|
||||
../compiler_lib/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/libfwbuilder.a \
|
||||
$$LIBS
|
||||
|
||||
win32:PRE_TARGETDEPS = ../common/release/common.lib \
|
||||
../iptlib/release/iptlib.lib \
|
||||
../compiler_lib/release/compilerdriver.lib \
|
||||
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
|
||||
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
|
||||
|
||||
!win32:PRE_TARGETDEPS = ../common/libcommon.a \
|
||||
../iptlib/libiptlib.a \
|
||||
../compiler_lib/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/libfwbuilder.a
|
||||
LIBS += $$PRE_TARGETDEPS $$LIBS
|
||||
|
||||
TARGET = fwb_ipt
|
||||
|
||||
|
||||
@ -53,9 +53,9 @@ CONFIG += staticlib
|
||||
INCLUDEPATH += ../compiler_lib ../libfwbuilder/src
|
||||
DEPENDPATH += ../compiler_lib ../libfwbuilder/src
|
||||
|
||||
win32:PRE_TARGETDEPS = ../compiler_lib/release/compilerdriver.lib \
|
||||
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib \
|
||||
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib
|
||||
win32:PRE_TARGETDEPS = ../compiler_lib/release/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/release/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/release/libfwbuilder.a
|
||||
|
||||
!win32:PRE_TARGETDEPS = ../compiler_lib/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
|
||||
|
||||
@ -1346,8 +1346,8 @@ bool FWObject::isReadOnly()
|
||||
|
||||
void FWObject::checkReadOnly() throw(FWException)
|
||||
{
|
||||
if (isReadOnly()) throw FWException(
|
||||
string("Attempt to modify read-only object ")+getName());
|
||||
if (isReadOnly() && ! getRoot()->getIgnoreReadOnlyFlag())
|
||||
throw FWException(string("Attempt to modify read-only object ")+getName());
|
||||
}
|
||||
|
||||
FWObjectTypedChildIterator::FWObjectTypedChildIterator(
|
||||
|
||||
@ -100,7 +100,9 @@ using namespace libfwbuilder;
|
||||
int id_seed = 1000;
|
||||
#ifdef _WIN32
|
||||
static int cached_pid = _getpid();
|
||||
# ifndef __GNUC__
|
||||
#define snprintf sprintf_s
|
||||
# endif
|
||||
#else
|
||||
static int cached_pid = getpid();
|
||||
#endif
|
||||
@ -123,6 +125,7 @@ FWObjectDatabase::FWObjectDatabase() : FWObject(false), data_file(), obj_index()
|
||||
index_hits = index_misses = 0;
|
||||
init_id_dict();
|
||||
predictable_id_tracker = 0;
|
||||
ignore_read_only = false;
|
||||
|
||||
searchId =0;
|
||||
lastModified = 0;
|
||||
@ -142,6 +145,7 @@ FWObjectDatabase::FWObjectDatabase(FWObjectDatabase& d) :
|
||||
index_hits = index_misses = 0;
|
||||
init_id_dict();
|
||||
predictable_id_tracker = 0;
|
||||
ignore_read_only = false;
|
||||
|
||||
data_file = d.data_file;
|
||||
|
||||
|
||||
@ -251,7 +251,8 @@ protected:
|
||||
std::map<int, FWObject*> obj_index;
|
||||
int searchId;
|
||||
int predictable_id_tracker;
|
||||
|
||||
bool ignore_read_only;
|
||||
|
||||
void init_create_methods_table();
|
||||
void init_id_dict();
|
||||
|
||||
@ -332,6 +333,13 @@ public:
|
||||
*/
|
||||
void getIndexStats(int &index_size, int &hit_counter, int &miss_counter);
|
||||
|
||||
/**
|
||||
* Some operations, such as object tree merging, should ignore
|
||||
* read-only flag on individual objects.
|
||||
*/
|
||||
bool getIgnoreReadOnlyFlag() { return ignore_read_only; }
|
||||
void setIgnoreReadOnlyFlag(bool f) { ignore_read_only = f; }
|
||||
|
||||
// --- XML import/export ---
|
||||
|
||||
virtual void fromXML(xmlNodePtr xml_parent_node) throw(FWException);
|
||||
@ -380,7 +388,15 @@ public:
|
||||
void findObjectsInGroup(
|
||||
libfwbuilder::Group *g,
|
||||
std::set<libfwbuilder::FWObject *> &resset);
|
||||
|
||||
|
||||
/**
|
||||
* We ignore read-only flag on individual objects when whole object
|
||||
* tree is duplicated
|
||||
*/
|
||||
virtual FWObject& duplicate(const FWObject *obj,
|
||||
bool preserve_id = true) throw(FWException);
|
||||
|
||||
|
||||
void recursivelyRemoveObjFromTree(FWObject* obj, bool remove_ref=false);
|
||||
|
||||
/**
|
||||
@ -400,7 +416,6 @@ public:
|
||||
* This means returned object can be a parent for the copy of <source>.
|
||||
*/
|
||||
FWObject* reproduceRelativePath(FWObject *lib, const FWObject *source);
|
||||
|
||||
|
||||
/**
|
||||
* fix references in children of obj according to the map_ids which
|
||||
|
||||
@ -48,9 +48,6 @@
|
||||
using namespace std;
|
||||
using namespace libfwbuilder;
|
||||
|
||||
#ifdef _WIN32
|
||||
#define snprintf sprintf_s
|
||||
#endif
|
||||
|
||||
class FWObjectTreeScanner {
|
||||
|
||||
@ -479,10 +476,12 @@ void FWObjectDatabase::merge( FWObjectDatabase *ndb,
|
||||
ConflictResolutionPredicate *crp)
|
||||
{
|
||||
busy = true;
|
||||
setIgnoreReadOnlyFlag(true);
|
||||
|
||||
FWObjectTreeScanner scanner(this, crp);
|
||||
scanner.merge(NULL, ndb);
|
||||
|
||||
setIgnoreReadOnlyFlag(false);
|
||||
busy = false;
|
||||
}
|
||||
|
||||
@ -701,3 +700,12 @@ FWObject* FWObjectDatabase::reproduceRelativePath(FWObject *lib,
|
||||
return target;
|
||||
}
|
||||
|
||||
FWObject& FWObjectDatabase::duplicate(const FWObject *obj,
|
||||
bool preserve_id) throw(FWException)
|
||||
{
|
||||
setIgnoreReadOnlyFlag(true);
|
||||
FWObject &o = FWObject::duplicate(obj, preserve_id);
|
||||
setIgnoreReadOnlyFlag(false);
|
||||
return o;
|
||||
}
|
||||
|
||||
|
||||
@ -36,11 +36,6 @@
|
||||
#include <fwbuilder/ServiceGroup.h>
|
||||
#include <fwbuilder/IntervalGroup.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
// disable "warning C4250: 'libfwbuilder::RuleElementTDst' : inherits 'libfwbuilder::RuleElement::addRef' via dominance"
|
||||
# pragma warning(disable:4250)
|
||||
#endif
|
||||
|
||||
namespace libfwbuilder
|
||||
{
|
||||
|
||||
|
||||
@ -33,9 +33,6 @@
|
||||
using namespace libfwbuilder;
|
||||
using namespace std;
|
||||
|
||||
#ifdef _WIN32
|
||||
#define snprintf sprintf_s
|
||||
#endif
|
||||
|
||||
const char *TCPUDPService::TYPENAME={"TCPUDPService"};
|
||||
|
||||
|
||||
@ -40,8 +40,7 @@
|
||||
# include <arpa/nameser.h>
|
||||
# include <unistd.h>
|
||||
#else
|
||||
# include <winsock2.h>
|
||||
# pragma warning(disable:4101)
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
@ -36,6 +36,9 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#include <inttypes.h> // for sprintf formats for "long long"
|
||||
|
||||
// convinience macro
|
||||
#define U128_C(s) uint128(#s)
|
||||
|
||||
@ -463,9 +466,9 @@ public:
|
||||
{
|
||||
char buf[33];
|
||||
if (hi)
|
||||
sprintf(buf,"%llX%08llX",(unsigned long long)hi,(unsigned long long)lo);
|
||||
sprintf(buf, "%"PRIX64"%08"PRIX64, (unsigned long long)hi,(unsigned long long)lo);
|
||||
else
|
||||
sprintf(buf,"%llX",(unsigned long long)lo);
|
||||
sprintf(buf,"%"PRIX64,(unsigned long long)lo);
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
@ -30,9 +30,14 @@
|
||||
#include "FWBApplication.h"
|
||||
#include "FWWindow.h"
|
||||
|
||||
#include "fwbuilder/FWException.h"
|
||||
|
||||
#include <QtDebug>
|
||||
#include <QTimer>
|
||||
|
||||
using namespace libfwbuilder;
|
||||
using namespace std;
|
||||
|
||||
|
||||
void FWBApplication::quit()
|
||||
{
|
||||
@ -63,3 +68,25 @@ void FWBApplication::delayedQuit()
|
||||
QApplication::quit();
|
||||
}
|
||||
|
||||
bool FWBApplication::notify(QObject *receiver, QEvent *event)
|
||||
{
|
||||
try
|
||||
{
|
||||
return QApplication::notify(receiver, event);
|
||||
} catch (const libfwbuilder::FWException &ex)
|
||||
{
|
||||
cerr << "Caught FWException: " << ex.toString() << std::endl;
|
||||
QCoreApplication::exit(1);
|
||||
} catch (const std::string &s) {
|
||||
cerr << s << std::endl;
|
||||
QCoreApplication::exit(1);
|
||||
} catch (const std::exception &ex) {
|
||||
cerr << ex.what() << std::endl;
|
||||
QCoreApplication::exit(1);
|
||||
}
|
||||
catch (...) {
|
||||
cerr << "Caught unsupported exception" << std::endl;
|
||||
QCoreApplication::exit(1);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -29,7 +29,8 @@
|
||||
#include <QApplication>
|
||||
|
||||
|
||||
class FWBApplication : public QApplication {
|
||||
class FWBApplication : public QApplication
|
||||
{
|
||||
|
||||
Q_OBJECT;
|
||||
int timeout;
|
||||
@ -37,6 +38,8 @@ class FWBApplication : public QApplication {
|
||||
public:
|
||||
FWBApplication(int &argc, char **argv) : QApplication(argc, argv) {}
|
||||
|
||||
virtual bool notify(QObject *receiver, QEvent *event);
|
||||
|
||||
public slots:
|
||||
|
||||
void quit();
|
||||
|
||||
@ -28,15 +28,15 @@
|
||||
#include "utils.h"
|
||||
#include "utils_no_qt.h"
|
||||
|
||||
#include "compiler_lib/CompilerDriver.h"
|
||||
#include "FirewallInstaller.h"
|
||||
#include "instDialog.h"
|
||||
#include "CompilerDriver.h"
|
||||
#include "Configlet.h"
|
||||
#include "FWBSettings.h"
|
||||
#include "FWWindow.h"
|
||||
#include "FirewallInstaller.h"
|
||||
#include "SSHSession.h"
|
||||
#include "SSHUnx.h"
|
||||
#include "Configlet.h"
|
||||
#include "UserWorkflow.h"
|
||||
#include "instDialog.h"
|
||||
|
||||
#include "fwbuilder/Resources.h"
|
||||
#include "fwbuilder/FWObjectDatabase.h"
|
||||
@ -193,7 +193,6 @@ not root.
|
||||
|
||||
*/
|
||||
|
||||
#include "CompilerDriver.h"
|
||||
|
||||
bool FirewallInstaller::readManifest(const QString &script,
|
||||
QMap<QString, QString> *all_files)
|
||||
|
||||
@ -581,6 +581,7 @@ INCLUDEPATH += \
|
||||
../pflib \
|
||||
../cisco_lib \
|
||||
../compiler_lib \
|
||||
../fwtransfer \
|
||||
../libfwbuilder/src
|
||||
DEPENDPATH += \
|
||||
../import \
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
#include "fwbuilder/Resources.h"
|
||||
#include "fwbuilder/Cluster.h"
|
||||
|
||||
#include "fwtransfer/TransferDevice.h"
|
||||
#include "TransferDevice.h"
|
||||
|
||||
#include "FWWindow.h"
|
||||
#include "FWBSettings.h"
|
||||
|
||||
@ -15,30 +15,13 @@ win32:CONFIG += console
|
||||
INCLUDEPATH += ../pflib ../compiler_lib ../libfwbuilder/src
|
||||
DEPENDPATH += ../pflib ../compiler_lib ../libfwbuilder/src
|
||||
|
||||
win32:LIBS += ../common/release/common.lib \
|
||||
../pflib/release/fwbpf.lib \
|
||||
../compiler_lib/release/compilerdriver.lib \
|
||||
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
|
||||
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
|
||||
PRE_TARGETDEPS = ../common/$$BINARY_SUBDIR/libcommon.a \
|
||||
../pflib/$$BINARY_SUBDIR/libfwbpf.a \
|
||||
../compiler_lib/$$BINARY_SUBDIR/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/$$BINARY_SUBDIR/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/$$BINARY_SUBDIR/libfwbuilder.a \
|
||||
|
||||
!win32:LIBS = ../common/libcommon.a \
|
||||
../pflib/libfwbpf.a \
|
||||
../compiler_lib/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/libfwbuilder.a \
|
||||
$$LIBS
|
||||
|
||||
win32:PRE_TARGETDEPS = ../common/release/common.lib \
|
||||
../pflib/release/fwbpf.lib \
|
||||
../compiler_lib/release/compilerdriver.lib \
|
||||
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
|
||||
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
|
||||
|
||||
!win32:PRE_TARGETDEPS = ../common/libcommon.a \
|
||||
../pflib/libfwbpf.a \
|
||||
../compiler_lib/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/libfwbuilder.a
|
||||
LIBS += $$PRE_TARGETDEPS $$LIBS
|
||||
|
||||
|
||||
TARGET = fwb_pf
|
||||
|
||||
@ -66,7 +66,7 @@ macx:LIBS += $$LIBS_FWCOMPILER
|
||||
INCLUDEPATH += ../compiler_lib ../libfwbuilder/src
|
||||
DEPENDPATH += ../compiler_lib ../libfwbuilder/src
|
||||
|
||||
win32:PRE_TARGETDEPS = ../compiler_lib/release/compilerdriver.lib
|
||||
win32:PRE_TARGETDEPS = ../compiler_lib/release/libcompilerdriver.a
|
||||
|
||||
!win32:PRE_TARGETDEPS = ../compiler_lib/libcompilerdriver.a
|
||||
|
||||
|
||||
@ -15,30 +15,13 @@ win32:CONFIG += console
|
||||
INCLUDEPATH += ../cisco_lib ../compiler_lib ../libfwbuilder/src
|
||||
DEPENDPATH += ../cisco_lib ../compiler_lib ../libfwbuilder/src
|
||||
|
||||
win32:LIBS += ../common/release/common.lib \
|
||||
../cisco_lib/release/fwbcisco.lib\
|
||||
../compiler_lib/release/compilerdriver.lib \
|
||||
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
|
||||
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
|
||||
PRE_TARGETDEPS = ../common/$$BINARY_SUBDIR/libcommon.a \
|
||||
../cisco_lib/$$BINARY_SUBDIR/libfwbcisco.a \
|
||||
../compiler_lib/$$BINARY_SUBDIR/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/$$BINARY_SUBDIR/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/$$BINARY_SUBDIR/libfwbuilder.a \
|
||||
|
||||
!win32:LIBS = ../common/libcommon.a \
|
||||
../cisco_lib/libfwbcisco.a \
|
||||
../compiler_lib/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/libfwbuilder.a \
|
||||
$$LIBS
|
||||
|
||||
win32:PRE_TARGETDEPS = ../common/release/common.lib \
|
||||
../cisco_lib/release/fwbcisco.lib \
|
||||
../compiler_lib/release/compilerdriver.lib \
|
||||
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
|
||||
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
|
||||
|
||||
!win32:PRE_TARGETDEPS = ../common/libcommon.a \
|
||||
../cisco_lib/libfwbcisco.a \
|
||||
../compiler_lib/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/libfwbuilder.a
|
||||
LIBS += $$PRE_TARGETDEPS $$LIBS
|
||||
|
||||
TARGET = fwb_pix
|
||||
|
||||
|
||||
@ -21,31 +21,13 @@ win32:CONFIG += console
|
||||
INCLUDEPATH += ../cisco_lib ../compiler_lib ../libfwbuilder/src
|
||||
DEPENDPATH += ../cisco_lib ../compiler_lib ../libfwbuilder/src
|
||||
|
||||
win32:LIBS += ../common/release/common.lib \
|
||||
../cisco_lib/release/fwbcisco.lib \
|
||||
../compiler_lib/release/compilerdriver.lib \
|
||||
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
|
||||
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
|
||||
|
||||
!win32:LIBS = ../common/libcommon.a \
|
||||
../cisco_lib/libfwbcisco.a \
|
||||
../compiler_lib/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/libfwbuilder.a \
|
||||
$$LIBS
|
||||
|
||||
win32:PRE_TARGETDEPS = ../common/release/common.lib \
|
||||
../cisco_lib/release/fwbcisco.lib \
|
||||
../compiler_lib/release/compilerdriver.lib \
|
||||
../libfwbuilder/src/fwbuilder/release/fwbuilder.lib \
|
||||
../libfwbuilder/src/fwcompiler/release/fwcompiler.lib
|
||||
|
||||
!win32:PRE_TARGETDEPS = ../common/libcommon.a \
|
||||
../cisco_lib/libfwbcisco.a \
|
||||
../compiler_lib/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/libfwbuilder.a
|
||||
PRE_TARGETDEPS = ../common/$$BINARY_SUBDIR/libcommon.a \
|
||||
../cisco_lib/$$BINARY_SUBDIR/libfwbcisco.a \
|
||||
../compiler_lib/$$BINARY_SUBDIR/libcompilerdriver.a \
|
||||
../libfwbuilder/src/fwcompiler/$$BINARY_SUBDIR/libfwcompiler.a \
|
||||
../libfwbuilder/src/fwbuilder/$$BINARY_SUBDIR/libfwbuilder.a \
|
||||
|
||||
LIBS += $$PRE_TARGETDEPS $$LIBS
|
||||
|
||||
TARGET = fwb_procurve_acl
|
||||
|
||||
|
||||
10
src/src.pro
10
src/src.pro
@ -18,17 +18,17 @@ SUBDIRS = libfwbuilder \
|
||||
compiler_lib \
|
||||
fwtransfer \
|
||||
iptlib \
|
||||
pflib \
|
||||
cisco_lib \
|
||||
libgui \
|
||||
gui \
|
||||
ipt \
|
||||
pflib \
|
||||
pf \
|
||||
ipf \
|
||||
ipfw \
|
||||
cisco_lib \
|
||||
iosacl \
|
||||
pix \
|
||||
procurve_acl \
|
||||
transfer_agents \
|
||||
fwbedit
|
||||
libgui \
|
||||
fwbedit \
|
||||
gui \
|
||||
|
||||
|
||||
@ -26,9 +26,9 @@ contains( HAVE_QTDBUS, 1 ):unix {
|
||||
|
||||
win32 {
|
||||
CONFIG += console
|
||||
LIBS += ../../fwtransfer/release/fwtransfer.lib \ # -lQtDBus
|
||||
../../libfwbuilder/src/fwcompiler/release/fwcompiler.lib \
|
||||
../../libfwbuilder/src/fwbuilder/release/fwbuilder.lib
|
||||
LIBS += ../../fwtransfer/release/libfwtransfer.a \ # -lQtDBus
|
||||
../../libfwbuilder/src/fwcompiler/release/libfwcompiler.a \
|
||||
../../libfwbuilder/src/fwbuilder/release/libfwbuilder.a
|
||||
}
|
||||
|
||||
TARGET = transfer_secuwall
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user