mirror of
https://github.com/fwbuilder/fwbuilder
synced 2025-06-15 06:37:26 +02:00
input field for path to scp in preferences dialog
This commit is contained in:
parent
46f58c2894
commit
5d7af145af
@ -1,12 +1,64 @@
|
||||
2008-10-08 vadim <vadim@vk.crocodile.org>
|
||||
|
||||
* PrefsDialog.cpp (PrefsDialog::accept): Added GUI control for the
|
||||
path to scp utility used by built-in policy installer
|
||||
|
||||
* All compilers: firewall object can be specified by its ID in
|
||||
addition to by name. Command line option "-i" tells compiler that
|
||||
the last parameter of the command line is object ID. This works
|
||||
reliably when firewall object name contains non-ascii characters
|
||||
and the program runs under locale using 8 bit characters. Built-in
|
||||
installer now uses this method while calling all policy compilers.
|
||||
|
||||
2008-10-07 vadim <vadim@vk.crocodile.org>
|
||||
|
||||
* pf.cpp, ipf.cpp: Policy compilers for pf and ipf use file name
|
||||
and path specified with "-o" command line option for the name and
|
||||
path for all .fw and .conf files they generate.
|
||||
|
||||
* instDialog.cpp: built-in installer finds all generated files
|
||||
when user specifies alternative name (possibly full path) for the
|
||||
generated script.
|
||||
|
||||
* FirewallInstaller.cpp (FirewallInstaller::getGeneratedFileFullPath):
|
||||
built-in installer works properly when firewall name contains
|
||||
non-english characters. In this case generated firewall script
|
||||
also has name that contains non-english characters.
|
||||
|
||||
* FWWindowPrint.cpp, RuleSetView.cpp, FWBSettings.h,
|
||||
ProjectPanel_state_ops.cpp: got rid of references to
|
||||
InterfacePolicy class; build fixes for FreeBSD 7 (should fix
|
||||
compile problems on other systems too, such as Solaris)
|
||||
|
||||
2008-10-06 vadim <vadim@vk.crocodile.org>
|
||||
|
||||
* SSHPIX.cpp (SSHPIX::stateMachine): fixed crash in built-in
|
||||
installer that happened when existing PIX configuration was saved
|
||||
before loading new one.
|
||||
|
||||
* pixAdvancedDialog.cpp (pixAdvancedDialog::accept): fixed crash
|
||||
that happened when user opened PIX firewall "advanced" settings
|
||||
dialog and then tried to save changes by clicking OK.
|
||||
|
||||
* FirewallInstaller.h (class FirewallInstaller): all installer
|
||||
logic moved to separate classes FirewallInstaller,
|
||||
FirewallInstallerCisco and FirewallInstallerUnx. These classes
|
||||
launch background process (via SSHSession or QProcess) and control
|
||||
all steps of policy installation and activation, but do not deal
|
||||
with the UI. This provides for good separation of functions
|
||||
between UI and core logic classes. The code is much cleaner and
|
||||
easier to maintain now.
|
||||
|
||||
2008-10-05 vadim <vadim@vk.crocodile.org>
|
||||
|
||||
* instDialog_unx.cpp (instDialog::copyFileOnUnx): Using
|
||||
scp (pscp.exe on windows) to copy files to the firewall. This
|
||||
helps improve performance of the installer. This fixes bug
|
||||
#2135827: "Store a copy of fwb file..." very slow
|
||||
|
||||
* instDialog.cpp (instDialog::instDialog): refactored installer
|
||||
classes to make code more manageable.
|
||||
|
||||
* VERSION: started 3.0.2
|
||||
|
||||
2008-10-04 Vadim Kurland <vadim@vk.crocodile.org>
|
||||
|
@ -12,6 +12,7 @@ fwb_ipt \- Policy compiler for Cisco IOS ACL
|
||||
.B [-d wdir]
|
||||
.B [-4]
|
||||
.B [-6]
|
||||
.B [-i]
|
||||
.B -f data_file.xml
|
||||
object_name
|
||||
|
||||
@ -62,6 +63,10 @@ Be verbose: compiler prints diagnostic messages when it works.
|
||||
.IP "-V"
|
||||
Print version number and quit.
|
||||
|
||||
.IP "-i"
|
||||
When this option is present, the last argument on the command line is
|
||||
supposed to be firewall object ID rather than its name
|
||||
|
||||
.SH URL
|
||||
Firewall Builder home page is located at the following URL:
|
||||
.B http://www.fwbuilder.org/
|
||||
|
@ -11,6 +11,7 @@ fwb_ipf \- Policy compiler for ipfilter
|
||||
.B [-vVx]
|
||||
.B [-d wdir]
|
||||
.B [-o output.fw]
|
||||
.B [-i]
|
||||
.B -f data_file.xml
|
||||
object_name
|
||||
|
||||
@ -56,6 +57,10 @@ Be verbose: compiler prints diagnostic messages when it works.
|
||||
.IP "-V"
|
||||
Print version number and quit.
|
||||
|
||||
.IP "-i"
|
||||
When this option is present, the last argument on the command line is
|
||||
supposed to be firewall object ID rather than its name
|
||||
|
||||
.IP "-x"
|
||||
Generate debugging information while working. This option is intended
|
||||
for debugging only and may produce lots of cryptic messages.
|
||||
|
@ -11,6 +11,7 @@ fwb_ipfw \- Policy compiler for ipfw
|
||||
.B [-vVx]
|
||||
.B [-d wdir]
|
||||
.B [-o output.fw]
|
||||
.B [-i]
|
||||
.B -f data_file.xml
|
||||
object_name
|
||||
|
||||
@ -50,6 +51,10 @@ Be verbose: compiler prints diagnostic messages when it works.
|
||||
.IP "-V"
|
||||
Print version number and quit.
|
||||
|
||||
.IP "-i"
|
||||
When this option is present, the last argument on the command line is
|
||||
supposed to be firewall object ID rather than its name
|
||||
|
||||
.IP "-x"
|
||||
Generate debugging information while working. This option is intended
|
||||
for debugging only and may produce lots of cryptic messages.
|
||||
|
@ -9,6 +9,7 @@ fwb_ipt \- Policy compiler for iptables
|
||||
.RB [-o output.fw]
|
||||
.RB [-4]
|
||||
.RB [-6]
|
||||
.RB [-i]
|
||||
.RB -f data_file.xml
|
||||
object_name
|
||||
|
||||
@ -57,6 +58,10 @@ Be verbose: compiler prints diagnostic messages when it works.
|
||||
.IP "-V"
|
||||
Print version number and quit.
|
||||
|
||||
.IP "-i"
|
||||
When this option is present, the last argument on the command line is
|
||||
supposed to be firewall object ID rather than its name
|
||||
|
||||
.SH URL
|
||||
Firewall Builder home page is located at the following URL:
|
||||
.B http://www.fwbuilder.org/
|
||||
|
@ -11,6 +11,7 @@ fwb_pf \- Policy compiler for OpenBSD packet filter "pf"
|
||||
.B [-vVx]
|
||||
.B [-d wdir]
|
||||
.B [-o output.fw]
|
||||
.B [-i]
|
||||
.B -f data_file.xml
|
||||
object_name
|
||||
|
||||
@ -56,6 +57,10 @@ Be verbose: compiler prints diagnostic messages when it works.
|
||||
.IP "-V"
|
||||
Print version number and quit.
|
||||
|
||||
.IP "-i"
|
||||
When this option is present, the last argument on the command line is
|
||||
supposed to be firewall object ID rather than its name
|
||||
|
||||
.IP "-x"
|
||||
Generate debugging information while working. This option is intended
|
||||
for debugging only and may produce lots of cryptic messages.
|
||||
|
@ -8,7 +8,7 @@ fwb_ipt \- Policy compiler for Cisco PIX
|
||||
.SH SYNOPSIS
|
||||
|
||||
.B fwb_pix
|
||||
.B [-vV]
|
||||
.B [-vVi]
|
||||
.B [-d wdir]
|
||||
.B -f data_file.xml
|
||||
object_name
|
||||
@ -41,6 +41,10 @@ Be verbose: compiler prints diagnostic messages when it works.
|
||||
.IP "-V"
|
||||
Print version number and quit.
|
||||
|
||||
.IP "-i"
|
||||
When this option is present, the last argument on the command line is
|
||||
supposed to be firewall object ID rather than its name
|
||||
|
||||
.SH URL
|
||||
Firewall Builder home page is located at the following URL:
|
||||
.B http://www.fwbuilder.org/
|
||||
|
32
qmake.inc
32
qmake.inc
@ -11,15 +11,15 @@ SO_VERSION = @LIBFWBUILDER_SOLIB_VERSION@
|
||||
DEFINES += $$(DEFINES)
|
||||
LANGUAGE = C++
|
||||
UI_DIR = ui
|
||||
MANDIR = /usr/home/vadim/src/fwb3/install_root/man/
|
||||
DOCDIR = /usr/home/vadim/src/fwb3/install_root/share/doc/fwbuilder-3.0.2
|
||||
MANDIR = /Users/vadim/src/fwb3-branch-v3/install_root/share/man/
|
||||
DOCDIR = /Users/vadim/src/fwb3-branch-v3/install_root/share/doc/fwbuilder-3.0.2
|
||||
|
||||
HAVE_ANTLR_RUNTIME = 1
|
||||
HAVE_EXTERNAL_ANTLR = 0
|
||||
|
||||
unix {
|
||||
ANTLR_INCLUDEPATH = /usr/home/vadim/src/fwb3/source/fwbuilder/src/
|
||||
ANTLR_LIBS = /usr/home/vadim/src/fwb3/source/fwbuilder/src/antlr/libantlr.a
|
||||
ANTLR_INCLUDEPATH = /Users/vadim/src/fwb3-branch-v3/source/fwbuilder/src/
|
||||
ANTLR_LIBS = /Users/vadim/src/fwb3-branch-v3/source/fwbuilder/src/antlr/libantlr.a
|
||||
FWBPARSER_LIB = ../parsers/libfwbparser.a
|
||||
}
|
||||
|
||||
@ -30,38 +30,38 @@ unix {
|
||||
MOC_DIR = .moc
|
||||
OBJECTS_DIR = .obj
|
||||
|
||||
PREFIX = /usr/home/vadim/src/fwb3/install_root
|
||||
PREFIX = /Users/vadim/src/fwb3-branch-v3/install_root
|
||||
exec_prefix = @EXEC_PREFIX@
|
||||
DESTDIR =
|
||||
ICONSDIR =
|
||||
|
||||
INCLUDEPATH += .. ../.. $$(INCLUDEPATH) /usr/home/vadim/src/fwb3/install_root/include/ /usr/home/vadim/src/fwb3/install_root/include/fwb-3 /usr/local/include /usr/local/include/libxml2
|
||||
INCLUDEPATH += .. ../.. $$(INCLUDEPATH) /Users/vadim/src/fwb3-branch-v3/install_root/include/ /Users/vadim/src/fwb3-branch-v3/install_root/include/fwb-3 /usr/include/libxml2
|
||||
|
||||
LIBS_FWCOMPILER = -L/usr/home/vadim/src/fwb3/install_root/lib -L/usr/local/lib -lfwcompiler -lfwbuilder -lxslt -lxml2 -lz -liconv -lm
|
||||
LIBS_FWBUILDER = -L/usr/home/vadim/src/fwb3/install_root/lib -L/usr/local/lib -lfwbuilder -lxslt -lxml2 -lz -liconv -lm
|
||||
LIBS_FWCOMPILER = -L/Users/vadim/src/fwb3-branch-v3/install_root/lib -lfwcompiler -lfwbuilder -lxslt -lxml2 -lz -lpthread -licucore -lm -lnetsnmp
|
||||
LIBS_FWBUILDER = -L/Users/vadim/src/fwb3-branch-v3/install_root/lib -lfwbuilder -lxslt -lxml2 -lz -lpthread -licucore -lm -lnetsnmp
|
||||
|
||||
target.path = $$PREFIX/bin
|
||||
dtd.path = @TEMPLATE_DIR@/
|
||||
migration.path = @TEMPLATE_DIR@/migration
|
||||
doc.path = /usr/home/vadim/src/fwb3/install_root/share/doc/fwbuilder-3.0.2
|
||||
datadir.path = /usr/home/vadim/src/fwb3/install_root/share/
|
||||
doc.path = /Users/vadim/src/fwb3-branch-v3/install_root/share/doc/fwbuilder-3.0.2
|
||||
datadir.path = /Users/vadim/src/fwb3-branch-v3/install_root/share/
|
||||
|
||||
|
||||
# win32:target.path = $$PREFIX/
|
||||
# unix:target.path = $$PREFIX/share/fwbuilder/
|
||||
# macx:target.path = $$PREFIX/
|
||||
|
||||
res.path = /usr/home/vadim/src/fwb3/install_root/share/fwbuilder-3.0.2
|
||||
res_os.path = /usr/home/vadim/src/fwb3/install_root/share/fwbuilder-3.0.2/os/
|
||||
res_platform.path = /usr/home/vadim/src/fwb3/install_root/share/fwbuilder-3.0.2/platform/
|
||||
res_help.path = /usr/home/vadim/src/fwb3/install_root/share/fwbuilder-3.0.2/help/
|
||||
res_desktop.path = /usr/home/vadim/src/fwb3/install_root/share//applications/
|
||||
res.path = ../Resources
|
||||
res_os.path = ../Resources/os/
|
||||
res_platform.path = ../Resources/platform/
|
||||
res_help.path = ../Resources/help/
|
||||
res_desktop.path = /Users/vadim/src/fwb3-branch-v3/install_root/share//applications/
|
||||
|
||||
INSTALLS += res
|
||||
INSTALLS += res_os
|
||||
INSTALLS += res_platform
|
||||
# INSTALLS += icns
|
||||
LIBS += $$LIBS_FWBUILDER -lutil
|
||||
LIBS += $$LIBS_FWBUILDER -L/sw/lib -lpoll
|
||||
|
||||
PKGLOCALEDIR = $$res.path/locale
|
||||
|
||||
|
@ -82,6 +82,7 @@ const char* WindowGeometrySetpath= SETTINGS_PATH_PREFIX "/Layout/";
|
||||
const char* screenPositionSetpath= SETTINGS_PATH_PREFIX "/ScreenPos/";
|
||||
|
||||
const char* SSHPath = SETTINGS_PATH_PREFIX "/SSH/SSHPath";
|
||||
const char* SCPPath = SETTINGS_PATH_PREFIX "/SSH/SCPPath";
|
||||
const char* showIconsInRules = SETTINGS_PATH_PREFIX "/UI/Icons/ShowIconsInRules";
|
||||
const char* showDirectionText = SETTINGS_PATH_PREFIX "/UI/Icons/ShowDirectionTextInRules";
|
||||
const char* iconsInRulesSize = SETTINGS_PATH_PREFIX "/UI/Icons/IconsInRulesSize";
|
||||
@ -191,6 +192,7 @@ void FWBSettings::init()
|
||||
|
||||
#ifndef _WIN32
|
||||
if (getSSHPath().isEmpty()) setSSHPath("ssh");
|
||||
if (getSCPPath().isEmpty()) setSCPPath("scp");
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -499,6 +501,16 @@ void FWBSettings::setSSHPath(const QString &path)
|
||||
setValue(SSHPath,path);
|
||||
}
|
||||
|
||||
QString FWBSettings::getSCPPath()
|
||||
{
|
||||
return value(SCPPath).toString();
|
||||
}
|
||||
|
||||
void FWBSettings::setSCPPath(const QString &path)
|
||||
{
|
||||
setValue(SCPPath,path);
|
||||
}
|
||||
|
||||
void FWBSettings::getPrinterOptions(QPrinter *printer,
|
||||
int &pageWidth,
|
||||
int &pageHeight)
|
||||
|
@ -137,6 +137,9 @@ class FWBSettings : public QSettings {
|
||||
QString getSSHPath();
|
||||
void setSSHPath(const QString &path);
|
||||
|
||||
QString getSCPPath();
|
||||
void setSCPPath(const QString &path);
|
||||
|
||||
void getPrinterOptions(QPrinter *printer,int &pageWidth,int &pageHeight);
|
||||
void setPrinterOptions(QPrinter *printer,int pageWidth,int pageHeight);
|
||||
|
||||
|
@ -657,9 +657,9 @@ void FWWindow::updateRuleOptions()
|
||||
if (activeProject()) activeProject()->updateRuleOptions();
|
||||
}
|
||||
|
||||
void FWWindow::updateFirewallName(FWObject *obj,const QString &str)
|
||||
void FWWindow::updateFirewallName()
|
||||
{
|
||||
if (activeProject()) activeProject()->updateFirewallName(obj, str);
|
||||
if (activeProject()) activeProject()->updateFirewallName();
|
||||
}
|
||||
|
||||
void FWWindow::scheduleRuleSetRedraw()
|
||||
|
@ -209,7 +209,7 @@ public slots:
|
||||
|
||||
bool saveIfModified();
|
||||
|
||||
void updateFirewallName(libfwbuilder::FWObject *obj,const QString &oldName);
|
||||
void updateFirewallName();
|
||||
void updateRuleSetView();
|
||||
void updateRuleOptions();
|
||||
void updateRuleSetViewSelection();
|
||||
|
294
src/gui/FirewallInstaller.cpp
Normal file
294
src/gui/FirewallInstaller.cpp
Normal file
@ -0,0 +1,294 @@
|
||||
/*
|
||||
|
||||
Firewall Builder
|
||||
|
||||
Copyright (C) 2008 NetCitadel, LLC
|
||||
|
||||
Author: Vadim Kurland vadim@fwbuilder.org
|
||||
|
||||
$Id$
|
||||
|
||||
This program is free software which we release under the GNU General Public
|
||||
License. You may redistribute and/or modify this program under the terms
|
||||
of that license as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
To get a copy of the GNU General Public License, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
#include "../../config.h"
|
||||
#include "global.h"
|
||||
#include "utils.h"
|
||||
#include "utils_no_qt.h"
|
||||
|
||||
#include "FirewallInstaller.h"
|
||||
#include "instDialog.h"
|
||||
#include "FWBSettings.h"
|
||||
#include "FWWindow.h"
|
||||
#include "SSHSession.h"
|
||||
|
||||
#include "fwbuilder/Resources.h"
|
||||
#include "fwbuilder/FWObjectDatabase.h"
|
||||
#include "fwbuilder/Firewall.h"
|
||||
#include "fwbuilder/XMLTools.h"
|
||||
#include "fwbuilder/Interface.h"
|
||||
#include "fwbuilder/Management.h"
|
||||
|
||||
#include <qfileinfo.h>
|
||||
#include <qstring.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
# include <unistd.h> // for access(2) and getdomainname
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
using namespace libfwbuilder;
|
||||
|
||||
bool FirewallInstaller::packInstallJobsList(Firewall*)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void FirewallInstaller::packSSHArgs(QStringList &args)
|
||||
{
|
||||
QString ssh = st->getSSHPath();
|
||||
|
||||
#ifdef _WIN32
|
||||
args.push_back(ssh);
|
||||
/*
|
||||
* putty ignores protocol and port specified in the session file if
|
||||
* command line option -ssh is given.
|
||||
*
|
||||
* On the other hand,the sign of session usage is an empty user name,
|
||||
* so we can check for that. If user name is empty, then putty will
|
||||
* use current Windows account name to log in to the firewall and this
|
||||
* is unlikely to work anyway. This seems to be a decent workaround.
|
||||
*/
|
||||
if (!cnf->user.isEmpty() && ssh.toLower().indexOf("plink.exe")!=-1)
|
||||
{
|
||||
args.push_back("-ssh");
|
||||
args.push_back("-pw");
|
||||
args.push_back(cnf->pwd);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
args.push_back(argv0.c_str());
|
||||
args.push_back("-X"); // fwbuilder works as ssh wrapper
|
||||
//if (fwbdebug)
|
||||
// args.push_back("-d");
|
||||
args.push_back("-t");
|
||||
args.push_back("-t");
|
||||
|
||||
#endif
|
||||
|
||||
if (!cnf->sshArgs.isEmpty())
|
||||
args += cnf->sshArgs.split(" ", QString::SkipEmptyParts);
|
||||
if (cnf->verbose) args.push_back("-v");
|
||||
if (!cnf->user.isEmpty())
|
||||
{
|
||||
args.push_back("-l");
|
||||
args.push_back(cnf->user);
|
||||
args.push_back(cnf->maddr);
|
||||
} else
|
||||
args.push_back(cnf->maddr);
|
||||
}
|
||||
|
||||
void FirewallInstaller::packSCPArgs(const QString &file_name,
|
||||
QStringList &args)
|
||||
{
|
||||
QString file_with_path = getFullPath(file_name);
|
||||
QString scp = st->getSCPPath();
|
||||
|
||||
#ifdef _WIN32
|
||||
args.push_back(scp);
|
||||
|
||||
if (!cnf->user.isEmpty() && scp.toLower().indexOf("pscp.exe")!=-1)
|
||||
{
|
||||
args.push_back("-ssh");
|
||||
args.push_back("-pw");
|
||||
args.push_back(cnf->pwd);
|
||||
}
|
||||
|
||||
#else
|
||||
args.push_back(argv0.c_str());
|
||||
args.push_back("-Y"); // fwbuilder works as scp wrapper
|
||||
#endif
|
||||
|
||||
if (!cnf->scpArgs.isEmpty())
|
||||
args += cnf->scpArgs.split(" ", QString::SkipEmptyParts);
|
||||
//if (cnf->verbose) args.push_back("-v");
|
||||
|
||||
args.push_back("-q");
|
||||
|
||||
args.push_back(file_with_path);
|
||||
|
||||
if (!cnf->user.isEmpty())
|
||||
args.push_back(cnf->user + "@" + cnf->maddr + ":" + cnf->fwdir);
|
||||
else
|
||||
args.push_back(cnf->maddr + ":" + cnf->fwdir);
|
||||
}
|
||||
|
||||
/*
|
||||
* take next job from job_list and execute it
|
||||
*/
|
||||
void FirewallInstaller::runJobs()
|
||||
{
|
||||
if (fwbdebug) qDebug("FirewallInstaller::runJobs");
|
||||
if (job_list.size()==0)
|
||||
{
|
||||
if (fwbdebug) qDebug("FirewallInstaller::runJobs: job list is empty");
|
||||
QTimer::singleShot( 1000, this, SLOT(mainLoopInstall()));
|
||||
return;
|
||||
}
|
||||
|
||||
instJob current_job = job_list.front();
|
||||
job_list.pop_front();
|
||||
|
||||
switch (current_job.job)
|
||||
{
|
||||
case COPY_FILE:
|
||||
copyFile(current_job.argument);
|
||||
break;
|
||||
|
||||
case EXECUTE_COMMAND:
|
||||
executeCommand(current_job.argument);
|
||||
break;
|
||||
|
||||
case ACTIVATE_POLICY:
|
||||
activatePolicy();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* copyFile starts background process and returns. Process object
|
||||
* emits signal finished() which will be connected to slot
|
||||
* commandFinished(). This slot checks termination status of the process
|
||||
* and if it was successfull, it schedules call to runJobs()
|
||||
*/
|
||||
void FirewallInstaller::copyFile(const QString &file_name)
|
||||
{
|
||||
}
|
||||
|
||||
void FirewallInstaller::executeCommand(const QString &cmd)
|
||||
{
|
||||
}
|
||||
|
||||
void FirewallInstaller::activatePolicy()
|
||||
{
|
||||
QTimer::singleShot( 0, this, SLOT(runJobs()));
|
||||
}
|
||||
|
||||
/*
|
||||
* parameter intermediate: if true, then this session is part of the
|
||||
* set required to complete install on single firewall, such as when
|
||||
* we need to copy several files and then activate policy. If this
|
||||
* parameter is false, the session is final and installer terminates
|
||||
* when it finishes. This only applies to when session finishes
|
||||
* successfully. If session finishes with an error, we always
|
||||
* terminate installer.
|
||||
*/
|
||||
void FirewallInstaller::runSSHSession(SSHSession *s, bool intermediate)
|
||||
{
|
||||
if (fwbdebug) qDebug("FirewallInstaller::runSSHSession()");
|
||||
|
||||
session = s;
|
||||
|
||||
session->setOptions(cnf);
|
||||
session->setFWBPrompt(fwb_prompt);
|
||||
|
||||
connect(session,SIGNAL(printStdout_sign(const QString&)),
|
||||
inst_dlg, SLOT(addToLog(const QString&)));
|
||||
|
||||
if (intermediate)
|
||||
connect(session,SIGNAL(sessionFinished_sign()),
|
||||
this, SLOT(runJobs()));
|
||||
else
|
||||
connect(session,SIGNAL(sessionFinished_sign()),
|
||||
inst_dlg, SLOT(installerSuccess()));
|
||||
|
||||
connect(session,SIGNAL(sessionFatalError_sign()),
|
||||
inst_dlg, SLOT(installerError()));
|
||||
|
||||
connect(session,SIGNAL(updateProgressBar_sign(int,bool)),
|
||||
inst_dlg, SLOT(updateProgressBar(int,bool)));
|
||||
|
||||
session->startSession();
|
||||
}
|
||||
|
||||
QString FirewallInstaller::getFullPath(const QString &file )
|
||||
{
|
||||
if (QDir::isRelativePath(file)) return cnf->wdir + "/" + file;
|
||||
else return file;
|
||||
}
|
||||
|
||||
/*
|
||||
* This method builds and returns activation command
|
||||
* This method is used for all firewall platforms but PIX
|
||||
*/
|
||||
QString FirewallInstaller::getActivationCmd()
|
||||
{
|
||||
if (!cnf->activationCmd.isEmpty())
|
||||
{
|
||||
return cnf->activationCmd;
|
||||
}
|
||||
|
||||
QString cmd="";
|
||||
|
||||
string optpath="activation/";
|
||||
|
||||
if (cnf->user=="root") optpath += "root/";
|
||||
else optpath += "reg_user/";
|
||||
|
||||
if (cnf->testRun)
|
||||
{
|
||||
optpath += "test/";
|
||||
if (cnf->rollback) optpath += "rollback/";
|
||||
else optpath += "no_rollback/";
|
||||
} else
|
||||
{
|
||||
optpath += "run/";
|
||||
if (cnf->compressScript) optpath += "compression/";
|
||||
else optpath += "no_compression/";
|
||||
}
|
||||
|
||||
cmd=Resources::getTargetOptionStr(cnf->fwobj->getStr("host_OS"),
|
||||
optpath).c_str();
|
||||
return inst_dlg->replaceMacrosInCommand(cmd);
|
||||
}
|
||||
|
||||
QString FirewallInstaller::getGeneratedFileFullPath(Firewall *fw)
|
||||
{
|
||||
/* bug #1617501: "Install fails after compile". The "output file"
|
||||
* setting that user enters in the "Compiler" tab of fw advanced
|
||||
* dialog can be either local or absolute path.
|
||||
*/
|
||||
FWOptions *fwopt = fw->getOptionsObject();
|
||||
QString generated_file;
|
||||
QString ofname = QString::fromUtf8(fwopt->getStr("output_file").c_str());
|
||||
if (!ofname.isEmpty())
|
||||
generated_file = ofname;
|
||||
else
|
||||
generated_file = QString::fromUtf8(fw->getName().c_str()) + ".fw";
|
||||
|
||||
QFileInfo gen_file_info(generated_file);
|
||||
if (!gen_file_info.isAbsolute())
|
||||
{
|
||||
QFileInfo fwb_file_info = QFileInfo(mw->getRCS()->getFileName());
|
||||
QString fwb_dir_path = fwb_file_info.dir().path();
|
||||
generated_file = fwb_dir_path + "/" + generated_file;
|
||||
}
|
||||
return generated_file;
|
||||
}
|
||||
|
110
src/gui/FirewallInstaller.h
Normal file
110
src/gui/FirewallInstaller.h
Normal file
@ -0,0 +1,110 @@
|
||||
/*
|
||||
|
||||
Firewall Builder
|
||||
|
||||
Copyright (C) 2008 NetCitadel, LLC
|
||||
|
||||
Author: Vadim Kurland vadim@fwbuilder.org
|
||||
|
||||
$Id$
|
||||
|
||||
This program is free software which we release under the GNU General Public
|
||||
License. You may redistribute and/or modify this program under the terms
|
||||
of that license as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
To get a copy of the GNU General Public License, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __FIREWALLINSTALLER_H_
|
||||
#define __FIREWALLINSTALLER_H_
|
||||
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#include "instConf.h"
|
||||
#include "instDialog.h"
|
||||
|
||||
#include <qstring.h>
|
||||
#include <qstringlist.h>
|
||||
#include <qprocess.h>
|
||||
#include <qobject.h>
|
||||
|
||||
#include <fstream>
|
||||
#include <set>
|
||||
#include <map>
|
||||
#include <list>
|
||||
|
||||
class SSHSession;
|
||||
class instDialog;
|
||||
|
||||
namespace libfwbuilder
|
||||
{
|
||||
class Firewall;
|
||||
}
|
||||
|
||||
enum instJobType {COPY_FILE, EXECUTE_COMMAND, ACTIVATE_POLICY};
|
||||
|
||||
class instJob
|
||||
{
|
||||
public:
|
||||
instJobType job;
|
||||
QString argument;
|
||||
|
||||
instJob(instJobType jt, const QString &a) { job=jt; argument=a; }
|
||||
};
|
||||
|
||||
class FirewallInstaller : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
instDialog *inst_dlg;
|
||||
instConf *cnf;
|
||||
// session is used when e run built-in installer
|
||||
SSHSession *session;
|
||||
std::list<instJob> job_list;
|
||||
QString fwb_prompt;
|
||||
|
||||
void runSSHSession(SSHSession *s, bool intermediate=false);
|
||||
QString getFullPath(const QString &file );
|
||||
|
||||
|
||||
public:
|
||||
|
||||
FirewallInstaller(instDialog *_dlg, instConf *_cnf, const QString &prompt)
|
||||
{
|
||||
inst_dlg = _dlg;
|
||||
cnf = _cnf;
|
||||
fwb_prompt = prompt;
|
||||
}
|
||||
|
||||
void packSSHArgs(QStringList &args);
|
||||
void packSCPArgs(const QString &file_name, QStringList &args);
|
||||
QString getActivationCmd();
|
||||
|
||||
virtual bool packInstallJobsList(libfwbuilder::Firewall*);
|
||||
virtual void copyFile(const QString &file_name);
|
||||
virtual void executeCommand(const QString &cmd);
|
||||
virtual void activatePolicy();
|
||||
|
||||
static QString getGeneratedFileFullPath(libfwbuilder::Firewall *fw);
|
||||
|
||||
|
||||
public slots:
|
||||
void runJobs();
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
137
src/gui/FirewallInstallerCisco.cpp
Normal file
137
src/gui/FirewallInstallerCisco.cpp
Normal file
@ -0,0 +1,137 @@
|
||||
/*
|
||||
|
||||
Firewall Builder
|
||||
|
||||
Copyright (C) 2008 NetCitadel, LLC
|
||||
|
||||
Author: Vadim Kurland vadim@fwbuilder.org
|
||||
|
||||
$Id$
|
||||
|
||||
This program is free software which we release under the GNU General Public
|
||||
License. You may redistribute and/or modify this program under the terms
|
||||
of that license as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
To get a copy of the GNU General Public License, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
#include "../../config.h"
|
||||
#include "global.h"
|
||||
#include "utils.h"
|
||||
#include "utils_no_qt.h"
|
||||
|
||||
#include "FirewallInstallerCisco.h"
|
||||
#include "instDialog.h"
|
||||
#include "SSHPIX.h"
|
||||
#include "SSHIOS.h"
|
||||
|
||||
#include "fwbuilder/Resources.h"
|
||||
#include "fwbuilder/FWObjectDatabase.h"
|
||||
#include "fwbuilder/Firewall.h"
|
||||
#include "fwbuilder/XMLTools.h"
|
||||
#include "fwbuilder/Interface.h"
|
||||
#include "fwbuilder/Management.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
# include <unistd.h> // for access(2) and getdomainname
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
using namespace libfwbuilder;
|
||||
|
||||
bool FirewallInstallerCisco::packInstallJobsList(Firewall*)
|
||||
{
|
||||
if (fwbdebug) qDebug("FirewallInstallerCisco::packInstallJobList");
|
||||
job_list.clear();
|
||||
job_list.push_back(instJob(ACTIVATE_POLICY, cnf->conffile));
|
||||
return true;
|
||||
}
|
||||
|
||||
void FirewallInstallerCisco::activatePolicy()
|
||||
{
|
||||
QStringList args;
|
||||
|
||||
packSSHArgs(args);
|
||||
if (cnf->verbose) inst_dlg->displayCommand(args);
|
||||
|
||||
SSHPIX *ssh_object = NULL;
|
||||
if (cnf->fwobj->getStr("platform")=="pix" ||
|
||||
cnf->fwobj->getStr("platform")=="fwsm")
|
||||
{
|
||||
ssh_object = new SSHPIX(inst_dlg,
|
||||
cnf->fwobj->getName().c_str(),
|
||||
args,
|
||||
cnf->pwd,
|
||||
cnf->epwd,
|
||||
list<string>());
|
||||
} else // ios
|
||||
{
|
||||
ssh_object = new SSHIOS(inst_dlg,
|
||||
cnf->fwobj->getName().c_str(),
|
||||
args,
|
||||
cnf->pwd,
|
||||
cnf->epwd,
|
||||
list<string>());
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO:
|
||||
* the structure of scriptlets (command templates) for PIX and
|
||||
* IOS is nice and generic, it uses generalized "pre_config"
|
||||
* and "post_config" hooks in SSHPIX / SSHIOS classes. Need to
|
||||
* do the same for Unix firewalls.
|
||||
*/
|
||||
|
||||
QString cmd = "";
|
||||
QStringList pre_config_commands;
|
||||
QStringList post_config_commands;
|
||||
|
||||
cmd = cnf->getCmdFromResource("pre_config_commands");
|
||||
pre_config_commands =
|
||||
inst_dlg->replaceMacrosInCommand(cmd).split("\n", QString::SkipEmptyParts);
|
||||
|
||||
if (cnf->rollback)
|
||||
{
|
||||
cmd = cnf->getCmdFromResource("schedule_rollback");
|
||||
pre_config_commands = pre_config_commands +
|
||||
inst_dlg->replaceMacrosInCommand(cmd).split("\n", QString::SkipEmptyParts);
|
||||
}
|
||||
|
||||
cmd = cnf->getCmdFromResource("post_config_commands");
|
||||
post_config_commands =
|
||||
inst_dlg->replaceMacrosInCommand(cmd).split("\n", QString::SkipEmptyParts);
|
||||
|
||||
if (cnf->cancelRollbackIfSuccess)
|
||||
{
|
||||
cmd = cnf->getCmdFromResource("cancel_rollback");
|
||||
post_config_commands = post_config_commands +
|
||||
inst_dlg->replaceMacrosInCommand(cmd).split("\n", QString::SkipEmptyParts);
|
||||
}
|
||||
|
||||
if (cnf->saveStandby)
|
||||
{
|
||||
cmd = cnf->getCmdFromResource("save_standby");
|
||||
post_config_commands = post_config_commands +
|
||||
inst_dlg->replaceMacrosInCommand(cmd).split("\n", QString::SkipEmptyParts);
|
||||
}
|
||||
|
||||
ssh_object->loadPreConfigCommands( pre_config_commands );
|
||||
ssh_object->loadPostConfigCommands( post_config_commands );
|
||||
|
||||
runSSHSession(ssh_object);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
60
src/gui/FirewallInstallerCisco.h
Normal file
60
src/gui/FirewallInstallerCisco.h
Normal file
@ -0,0 +1,60 @@
|
||||
/*
|
||||
|
||||
Firewall Builder
|
||||
|
||||
Copyright (C) 2008 NetCitadel, LLC
|
||||
|
||||
Author: Vadim Kurland vadim@fwbuilder.org
|
||||
|
||||
$Id$
|
||||
|
||||
This program is free software which we release under the GNU General Public
|
||||
License. You may redistribute and/or modify this program under the terms
|
||||
of that license as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
To get a copy of the GNU General Public License, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __FIREWALLINSTALLERCISCO_H_
|
||||
#define __FIREWALLINSTALLERCISCO_H_
|
||||
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#include "FirewallInstaller.h"
|
||||
|
||||
#include <qstring.h>
|
||||
#include <qstringlist.h>
|
||||
#include <qprocess.h>
|
||||
#include <qobject.h>
|
||||
|
||||
namespace libfwbuilder
|
||||
{
|
||||
class Firewall;
|
||||
}
|
||||
|
||||
class FirewallInstallerCisco : public FirewallInstaller
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
FirewallInstallerCisco(instDialog *_dlg, instConf *_cnf, const QString &_p):
|
||||
FirewallInstaller(_dlg, _cnf, _p) {}
|
||||
|
||||
virtual bool packInstallJobsList(libfwbuilder::Firewall*);
|
||||
virtual void activatePolicy();
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
294
src/gui/FirewallInstallerUnx.cpp
Normal file
294
src/gui/FirewallInstallerUnx.cpp
Normal file
@ -0,0 +1,294 @@
|
||||
/*
|
||||
|
||||
Firewall Builder
|
||||
|
||||
Copyright (C) 2008 NetCitadel, LLC
|
||||
|
||||
Author: Vadim Kurland vadim@fwbuilder.org
|
||||
|
||||
$Id$
|
||||
|
||||
This program is free software which we release under the GNU General Public
|
||||
License. You may redistribute and/or modify this program under the terms
|
||||
of that license as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
To get a copy of the GNU General Public License, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
#include "../../config.h"
|
||||
#include "global.h"
|
||||
#include "utils.h"
|
||||
#include "utils_no_qt.h"
|
||||
|
||||
#include "FirewallInstallerUnx.h"
|
||||
#include "instDialog.h"
|
||||
#include "SSHUnx.h"
|
||||
#include "FWWindow.h"
|
||||
|
||||
#include "fwbuilder/Resources.h"
|
||||
#include "fwbuilder/FWObjectDatabase.h"
|
||||
#include "fwbuilder/Firewall.h"
|
||||
#include "fwbuilder/XMLTools.h"
|
||||
#include "fwbuilder/Interface.h"
|
||||
#include "fwbuilder/Management.h"
|
||||
|
||||
#include <qpushbutton.h>
|
||||
#include <qfile.h>
|
||||
#include <qfileinfo.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
# include <unistd.h> // for access(2) and getdomainname
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
using namespace libfwbuilder;
|
||||
|
||||
bool FirewallInstallerUnx::packInstallJobsList(Firewall* fw)
|
||||
{
|
||||
if (fwbdebug) qDebug("FirewallInstallerUnx::packInstallJobList");
|
||||
|
||||
job_list.clear();
|
||||
|
||||
Management *mgmt = cnf->fwobj->getManagementObject();
|
||||
assert(mgmt!=NULL);
|
||||
PolicyInstallScript *pis = mgmt->getPolicyInstallScript();
|
||||
if (pis->getCommand()!="")
|
||||
{
|
||||
job_list.push_back(instJob(ACTIVATE_POLICY, ""));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (cnf->copyFWB)
|
||||
{
|
||||
QFileInfo fwbfile_base(cnf->fwbfile);
|
||||
|
||||
if (fwbdebug)
|
||||
qDebug( QString("Will copy data file: %1").arg(
|
||||
fwbfile_base.fileName()).toAscii().constData());
|
||||
|
||||
job_list.push_back(instJob(COPY_FILE, fwbfile_base.fileName()));
|
||||
}
|
||||
|
||||
/* read manifest from the conf file */
|
||||
|
||||
if (fwbdebug)
|
||||
qDebug("FirewallInstaller::packInstallJobsList read manifest from %s",
|
||||
cnf->conffile.toAscii().constData());
|
||||
|
||||
/* Note that if output file is specified in firewall settings dialog,
|
||||
* it can be an absolute path. In this case compiler puts additional
|
||||
* generated files (if any) in the same directory. The manifest in the
|
||||
* .fw file does not specify directory path so that the .fw file and
|
||||
* all additional files can be moved together someplace else. We take
|
||||
* dir path from the .fw file and if it is not empty, assume that all
|
||||
* other files are located there as well.
|
||||
*/
|
||||
|
||||
QFileInfo cnf_file_info(cnf->conffile);
|
||||
QString dir_path = "";
|
||||
if (cnf_file_info.isAbsolute())
|
||||
dir_path = cnf_file_info.dir().path() + "/";
|
||||
|
||||
// compilers always write file names into manifest in Utf8
|
||||
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("Utf8"));
|
||||
QTextCodec::setCodecForLocale(QTextCodec::codecForName("Utf8"));
|
||||
|
||||
// the file name is always in Utf8, regardless of the OS locale
|
||||
// because compilers create file name from the fw object name
|
||||
// which is stored in XML file in Utf8. QFile does some tricks
|
||||
// with names depending on the current locale, so it can not find
|
||||
// file if fw object name has non-ascii characters AND system
|
||||
// locale is not "C". Open file using simple system function
|
||||
// open(), then pass file descriptor to QFile.
|
||||
QFile cf;
|
||||
int fd = open(cnf->conffile.toAscii().constData(), O_RDONLY);
|
||||
if (cf.open(fd, QIODevice::ReadOnly ))
|
||||
{
|
||||
QTextStream stream(&cf);
|
||||
QString line;
|
||||
while (!stream.atEnd())
|
||||
{
|
||||
line = stream.readLine();
|
||||
int pos = -1;
|
||||
if ( (pos=line.indexOf(MANIFEST_MARKER))!=-1 )
|
||||
{
|
||||
int n = pos + QString(MANIFEST_MARKER).length();
|
||||
QString conf_file = line.mid(n+2);
|
||||
job_list.push_back(instJob(COPY_FILE, dir_path + conf_file));
|
||||
|
||||
if (fwbdebug)
|
||||
qDebug("FirewallInstaller: adding %c %s",
|
||||
line[n].toLatin1(),
|
||||
line.mid(n+2).toAscii().constData());
|
||||
}
|
||||
line = "";
|
||||
}
|
||||
cf.close();
|
||||
} else
|
||||
{
|
||||
QMessageBox::critical(
|
||||
inst_dlg, "Firewall Builder",
|
||||
tr("Generated script file %1 not found.").arg(cnf->conffile),
|
||||
tr("&Continue") );
|
||||
inst_dlg->opError(fw);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (job_list.size()==0)
|
||||
job_list.push_back(instJob(COPY_FILE, cnf->conffile));
|
||||
|
||||
job_list.push_back(instJob(ACTIVATE_POLICY, ""));
|
||||
return true;
|
||||
}
|
||||
|
||||
// ************************************************************************
|
||||
|
||||
void FirewallInstallerUnx::activatePolicy()
|
||||
{
|
||||
Management *mgmt = cnf->fwobj->getManagementObject();
|
||||
assert(mgmt!=NULL);
|
||||
PolicyInstallScript *pis = mgmt->getPolicyInstallScript();
|
||||
if (pis->getCommand()=="" )
|
||||
executeSession(getActivationCmd());
|
||||
else
|
||||
executeInstallScript();
|
||||
}
|
||||
|
||||
void FirewallInstallerUnx::executeInstallScript()
|
||||
{
|
||||
Management *mgmt = cnf->fwobj->getManagementObject();
|
||||
assert(mgmt!=NULL);
|
||||
PolicyInstallScript *pis = mgmt->getPolicyInstallScript();
|
||||
|
||||
QString wdir = getFileDir( mw->getRCS()->getFileName() );
|
||||
QStringList args;
|
||||
args.push_back(pis->getCommand().c_str());
|
||||
|
||||
QString qs = pis->getArguments().c_str();
|
||||
args += qs.split(" ", QString::SkipEmptyParts);
|
||||
|
||||
args.push_back("-f");
|
||||
args.push_back(mw->db()->getFileName().c_str());
|
||||
|
||||
if (wdir!="")
|
||||
{
|
||||
args.push_back("-d");
|
||||
args.push_back(wdir);
|
||||
}
|
||||
args.push_back(cnf->fwobj->getName().c_str());
|
||||
|
||||
if (cnf->verbose) inst_dlg->displayCommand(args);
|
||||
qApp->processEvents();
|
||||
|
||||
executeCommand(args);
|
||||
}
|
||||
|
||||
void FirewallInstallerUnx::executeSession(const QString &cmd)
|
||||
{
|
||||
QStringList args;
|
||||
packSSHArgs(args);
|
||||
args.push_back( cmd );
|
||||
if (cnf->verbose) inst_dlg->displayCommand(args);
|
||||
|
||||
inst_dlg->enableStopButton();
|
||||
|
||||
qApp->processEvents();
|
||||
|
||||
runSSHSession( new SSHUnx(inst_dlg,
|
||||
cnf->fwobj->getName().c_str(),
|
||||
args,
|
||||
cnf->pwd,
|
||||
"",
|
||||
list<string>()), false );
|
||||
}
|
||||
|
||||
// ************************************************************************
|
||||
|
||||
void FirewallInstallerUnx::copyFile(const QString &file_name)
|
||||
{
|
||||
QString platform = cnf->fwobj->getStr("platform").c_str();
|
||||
|
||||
// QTextCodec::setCodecForCStrings(QTextCodec::codecForName("latin1"));
|
||||
|
||||
QStringList args;
|
||||
packSCPArgs(file_name, args);
|
||||
|
||||
QString file_with_path = getFullPath(file_name);
|
||||
inst_dlg->addToLog( tr("Copying %1 -> %2:%3\n")
|
||||
.arg(QString::fromUtf8(file_with_path.toAscii().constData()))
|
||||
.arg(cnf->maddr).arg(cnf->fwdir));
|
||||
|
||||
if (cnf->verbose) inst_dlg->displayCommand(args);
|
||||
qApp->processEvents();
|
||||
|
||||
// Need session for scp copy because we need to enter password
|
||||
runSSHSession( new SSHUnx(inst_dlg,
|
||||
cnf->fwobj->getName().c_str(),
|
||||
args,
|
||||
cnf->pwd,
|
||||
"",
|
||||
list<string>()), true );
|
||||
}
|
||||
|
||||
// ************************************************************************
|
||||
|
||||
void FirewallInstallerUnx::executeCommand(const QString &cmd)
|
||||
{
|
||||
QStringList args;
|
||||
packSSHArgs(args);
|
||||
args.push_back( cmd );
|
||||
if (cnf->verbose) inst_dlg->displayCommand(args);
|
||||
qApp->processEvents();
|
||||
|
||||
executeCommand(args);
|
||||
}
|
||||
|
||||
// ************************************************************************
|
||||
|
||||
/*
|
||||
* All other methods operate with SSHSession objects because they are
|
||||
* interactive (even if only to enter password). We do not need
|
||||
* interactivity to run single command so here we use QProcess instead
|
||||
* of SSHSession.
|
||||
*/
|
||||
void FirewallInstallerUnx::executeCommand(QStringList &args)
|
||||
{
|
||||
connect(&proc, SIGNAL(readyReadStandardOutput()),
|
||||
inst_dlg, SLOT(readFromStdout()) );
|
||||
|
||||
// even though we set channel mode to "merged", QProcess
|
||||
// seems to not merge them on windows.
|
||||
proc.setProcessChannelMode(QProcess::MergedChannels);
|
||||
|
||||
QString path = args.at(0);
|
||||
args.pop_front();
|
||||
|
||||
proc.disconnect(SIGNAL(finished(int,QProcess::ExitStatus)));
|
||||
connect(&proc, SIGNAL(finished(int,QProcess::ExitStatus)),
|
||||
inst_dlg, SLOT(installerFinished(int,QProcess::ExitStatus)) );
|
||||
inst_dlg->enableStopButton();
|
||||
|
||||
proc.start(path, args);
|
||||
|
||||
if ( !proc.waitForStarted() )
|
||||
{
|
||||
inst_dlg->addToLog(tr("Error: Failed to start program:"));
|
||||
inst_dlg->addToLog(path);
|
||||
inst_dlg->opError(cnf->fwobj);
|
||||
QTimer::singleShot( 0, inst_dlg, SLOT(mainLoopInstall()));
|
||||
return;
|
||||
}
|
||||
args.push_front(path);
|
||||
}
|
||||
|
69
src/gui/FirewallInstallerUnx.h
Normal file
69
src/gui/FirewallInstallerUnx.h
Normal file
@ -0,0 +1,69 @@
|
||||
/*
|
||||
|
||||
Firewall Builder
|
||||
|
||||
Copyright (C) 2008 NetCitadel, LLC
|
||||
|
||||
Author: Vadim Kurland vadim@fwbuilder.org
|
||||
|
||||
$Id$
|
||||
|
||||
This program is free software which we release under the GNU General Public
|
||||
License. You may redistribute and/or modify this program under the terms
|
||||
of that license as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
To get a copy of the GNU General Public License, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __FIREWALLINSTALLERUNX_H_
|
||||
#define __FIREWALLINSTALLERUNX_H_
|
||||
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#include "FirewallInstaller.h"
|
||||
|
||||
#include <qstring.h>
|
||||
#include <qstringlist.h>
|
||||
#include <qprocess.h>
|
||||
#include <qobject.h>
|
||||
|
||||
namespace libfwbuilder
|
||||
{
|
||||
class Firewall;
|
||||
}
|
||||
|
||||
class FirewallInstallerUnx : public FirewallInstaller
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
QProcess proc;
|
||||
|
||||
void executeInstallScript();
|
||||
void executeSession(const QString &cmd);
|
||||
void executeCommand(QStringList &args);
|
||||
|
||||
public:
|
||||
|
||||
FirewallInstallerUnx(instDialog *_dlg, instConf *_cnf, const QString &_p) :
|
||||
FirewallInstaller(_dlg, _cnf, _p) {}
|
||||
|
||||
virtual bool packInstallJobsList(libfwbuilder::Firewall*);
|
||||
virtual void copyFile(const QString &file_name);
|
||||
virtual void executeCommand(const QString &cmd);
|
||||
virtual void activatePolicy();
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -527,12 +527,12 @@ void ObjectManipulator::updateObjName(FWObject *obj,
|
||||
/* need to update name of the firewall in the drop-down list */
|
||||
if (Firewall::isA(obj))
|
||||
{
|
||||
m_project->updateFirewallName(obj,oldName);
|
||||
m_project->updateFirewallName();
|
||||
}
|
||||
|
||||
if (RuleSet::cast(obj)!=NULL)
|
||||
{
|
||||
m_project->updateFirewallName(obj,oldName);
|
||||
m_project->updateFirewallName();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -117,6 +117,7 @@ PrefsDialog::PrefsDialog(QWidget *parent) : QDialog(parent)
|
||||
// dontSaveStdLib->setChecked( st->getDontSaveStdLib() );
|
||||
|
||||
m_dialog->sshPath->setText( st->getSSHPath() );
|
||||
m_dialog->scpPath->setText( st->getSCPPath() );
|
||||
|
||||
for (list<libData>::iterator i=mw->getAddOnLibs()->begin(); i!=mw->getAddOnLibs()->end(); ++i)
|
||||
{
|
||||
@ -318,6 +319,15 @@ void PrefsDialog::findSSH()
|
||||
if (!fp.isEmpty()) m_dialog->sshPath->setText(fp);
|
||||
}
|
||||
|
||||
void PrefsDialog::findSCP()
|
||||
{
|
||||
QString fp = QFileDialog::getOpenFileName(
|
||||
this,
|
||||
tr("Find SCP utility") );
|
||||
|
||||
if (!fp.isEmpty()) m_dialog->scpPath->setText(fp);
|
||||
}
|
||||
|
||||
void PrefsDialog::libClick(QTreeWidgetItem* itm, int col)
|
||||
{
|
||||
if (itm && col==1)
|
||||
@ -473,6 +483,7 @@ void PrefsDialog::accept()
|
||||
st->setCheckUpdatesProxy(m_dialog->checkUpdatesProxy->text());
|
||||
|
||||
st->setSSHPath( m_dialog->sshPath->text() );
|
||||
st->setSCPPath( m_dialog->scpPath->text() );
|
||||
|
||||
if (!wd.isEmpty())
|
||||
{
|
||||
|
@ -73,6 +73,7 @@ public slots:
|
||||
virtual void addLibrary();
|
||||
virtual void remLibrary();
|
||||
virtual void findSSH();
|
||||
virtual void findSCP();
|
||||
virtual void libClick(QTreeWidgetItem* itm, int col);
|
||||
virtual void changeRedColor();
|
||||
virtual void changeOrangeColor();
|
||||
|
@ -427,13 +427,7 @@ void ProjectPanel::reopenFirewall()
|
||||
m_panel->ruleSets->removeWidget(m_panel->ruleSets->widget(i));
|
||||
|
||||
m_panel->rulesetname->setTextFormat(Qt::RichText);
|
||||
QString name = "<B>";
|
||||
FWObject * p = visibleRuleSet->getParent();
|
||||
name += p->getName().c_str();
|
||||
name += " / ";
|
||||
name += visibleRuleSet->getName().c_str();
|
||||
name += "</B>";
|
||||
m_panel->rulesetname->setText(name );
|
||||
updateFirewallName();
|
||||
|
||||
last_modified = db()->getTimeLastModified();
|
||||
if (fwbdebug)
|
||||
@ -485,16 +479,16 @@ int ProjectPanel::findFirewallInList(FWObject *f)
|
||||
return -1;
|
||||
}
|
||||
|
||||
void ProjectPanel::updateFirewallName(FWObject *, const QString &)
|
||||
void ProjectPanel::updateFirewallName()
|
||||
{
|
||||
if (visibleRuleSet==NULL)
|
||||
return ;
|
||||
|
||||
QString name = "<B>";
|
||||
FWObject * p = visibleRuleSet->getParent();
|
||||
name += p->getName().c_str();
|
||||
name += QString::fromUtf8(p->getName().c_str());
|
||||
name += " / ";
|
||||
name += visibleRuleSet->getName().c_str();
|
||||
name += QString::fromUtf8(visibleRuleSet->getName().c_str());
|
||||
name += "</B>";
|
||||
m_panel->rulesetname->setText(name );
|
||||
}
|
||||
|
@ -249,7 +249,7 @@ public:
|
||||
void updateRuleOptions();
|
||||
void updateTreeViewItemOrder();
|
||||
int findFirewallInList(libfwbuilder::FWObject *f);
|
||||
void updateFirewallName(libfwbuilder::FWObject *obj,const QString &str);
|
||||
void updateFirewallName();
|
||||
void scheduleRuleSetRedraw();
|
||||
void selectRules();
|
||||
void unselectRules();
|
||||
|
@ -83,6 +83,8 @@ SSHPIX::SSHPIX(QWidget *_par,
|
||||
errorsEnabledState.push_back("invalid");
|
||||
errorsEnabledState.push_back("cannot find");
|
||||
errorsEnabledState.push_back("An object-group with the same id but different type");
|
||||
|
||||
local_event_loop = new QEventLoop();
|
||||
}
|
||||
|
||||
void SSHPIX::loadPreConfigCommands(const QStringList &cl)
|
||||
@ -101,14 +103,15 @@ SSHPIX::~SSHPIX()
|
||||
|
||||
QString SSHPIX::cmd(QProcess *proc,const QString &cmd)
|
||||
{
|
||||
if (fwbdebug) qDebug("Command '%s'", cmd.toAscii().constData());
|
||||
stdoutBuffer="";
|
||||
|
||||
proc->write( (cmd + "\n").toAscii() );
|
||||
// proc->write( "\n" );
|
||||
state = EXECUTING_COMMAND;
|
||||
local_event_loop->exec();
|
||||
//qApp->processEvents();
|
||||
|
||||
state=EXECUTING_COMMAND;
|
||||
qApp->processEvents();
|
||||
// QApplication::eventLoop()->enterLoop();
|
||||
if (fwbdebug) qDebug("Command '%s' completed", cmd.toAscii().constData());
|
||||
|
||||
return stdoutBuffer;
|
||||
}
|
||||
@ -326,11 +329,13 @@ void SSHPIX::stateMachine()
|
||||
break;
|
||||
|
||||
case EXECUTING_COMMAND:
|
||||
if ( cmpPrompt(stdoutBuffer,QRegExp(enable_prompt)) )
|
||||
if ( cmpPrompt(stdoutBuffer, QRegExp(enable_prompt)) )
|
||||
{
|
||||
//QApplication::eventLoop()->exitLoop();
|
||||
QCoreApplication::exit();
|
||||
state=COMMAND_DONE;
|
||||
//QCoreApplication::exit();
|
||||
state = COMMAND_DONE;
|
||||
if (fwbdebug) qDebug("Switching to COMMAND_DONE state; state=%d",
|
||||
state);
|
||||
if (local_event_loop->isRunning()) local_event_loop->exit();
|
||||
}
|
||||
break;
|
||||
|
||||
@ -447,7 +452,7 @@ void SSHPIX::stateMachine()
|
||||
// state=GET_ACLS;
|
||||
// goto entry;
|
||||
|
||||
state=EXIT_FROM_CONFIG;
|
||||
state = EXIT_FROM_CONFIG;
|
||||
emit printStdout_sign( tr("End") + "\n" );
|
||||
proc->write( "exit\n" );
|
||||
}
|
||||
@ -527,15 +532,25 @@ void SSHPIX::PIXbackup()
|
||||
{
|
||||
if (fwbdebug) qDebug("SSHPIX::PIXbackup ");
|
||||
|
||||
bool sv=verbose;
|
||||
verbose=false;
|
||||
bool sv = verbose;
|
||||
verbose = false;
|
||||
|
||||
emit printStdout_sign(tr("Making backup copy of the firewall configuration"));
|
||||
emit printStdout_sign(
|
||||
tr("Making backup copy of the firewall configuration"));
|
||||
emit printStdout_sign( "\n");
|
||||
|
||||
QString cfg=cmd(proc,"show run");
|
||||
cmd(proc, "terminal pager 0");
|
||||
if (state==FINISH) return;
|
||||
|
||||
verbose=sv;
|
||||
if (fwbdebug) qDebug("terminal pager 0 done");
|
||||
|
||||
QString cfg = cmd(proc, "show run");
|
||||
|
||||
if (fwbdebug) qDebug("show run done");
|
||||
|
||||
verbose = sv;
|
||||
|
||||
if (fwbdebug) qDebug("state=%d", state);
|
||||
|
||||
/* if state changed to FINISH, there was an error and ssh terminated */
|
||||
if (state==FINISH) return;
|
||||
@ -545,8 +560,8 @@ void SSHPIX::PIXbackup()
|
||||
ofs << cfg.toAscii().constData();
|
||||
ofs.close();
|
||||
|
||||
backup=false; // backup is done
|
||||
state=ENABLE;
|
||||
backup = false; // backup is done
|
||||
state = ENABLE;
|
||||
}
|
||||
|
||||
proc->write( "\n" );
|
||||
@ -561,7 +576,7 @@ void SSHPIX::getACLs()
|
||||
verbose=false;
|
||||
quiet=true;
|
||||
|
||||
QString sa=cmd(proc,"show access-list");
|
||||
QString sa = cmd(proc,"show access-list");
|
||||
|
||||
QStringList showAcls;
|
||||
showAcls=sa.split("\n");
|
||||
@ -605,7 +620,9 @@ void SSHPIX::clearACLs()
|
||||
currentAcls.pop_front();
|
||||
if (newAcls.indexOf(ca)==-1)//newAcls.end())
|
||||
{
|
||||
if (fwbdebug) qDebug("clear access-list %s",ca.toAscii().constData());
|
||||
if (fwbdebug)
|
||||
qDebug("clear access-list %s",ca.toAscii().constData());
|
||||
|
||||
cmd(proc,QString("clear access-list %1").arg(ca));
|
||||
|
||||
/* if state changed to FINISH, there was an error and ssh terminated */
|
||||
@ -626,7 +643,7 @@ void SSHPIX::getObjectGroups()
|
||||
verbose=false;
|
||||
quiet=true;
|
||||
|
||||
QString sog=cmd(proc,"show object-group");
|
||||
QString sog = cmd(proc,"show object-group");
|
||||
|
||||
QStringList showOG;
|
||||
showOG=sog.split("\n");
|
||||
@ -670,15 +687,17 @@ void SSHPIX::clearObjectGroups()
|
||||
currentObjectGroups.pop_front();
|
||||
if (newObjectGroups.indexOf(ca)==-1)//==newObjectGroups.end())
|
||||
{
|
||||
if (fwbdebug) qDebug("clear object-group %s",ca.toAscii().constData());
|
||||
cmd(proc,QString("clear object-group %1").arg(ca));
|
||||
if (fwbdebug)
|
||||
qDebug("clear object-group %s",ca.toAscii().constData());
|
||||
|
||||
cmd(proc, QString("clear object-group %1").arg(ca));
|
||||
|
||||
/* if state changed to FINISH, there was an error and ssh terminated */
|
||||
if (state==FINISH) return;
|
||||
}
|
||||
}
|
||||
|
||||
state=EXIT_FROM_CONFIG;
|
||||
state = EXIT_FROM_CONFIG;
|
||||
emit printStdout_sign( tr("*** End ") + "\n" );
|
||||
proc->write( "exit\n" );
|
||||
}
|
||||
@ -693,17 +712,17 @@ void SSHPIX::PIXincrementalInstall()
|
||||
emit printStdout_sign(tr("Reading current firewall configuration"));
|
||||
emit printStdout_sign( "\n");
|
||||
|
||||
current_config =cmd(proc,"show run | grep ^telnet|^ssh|^icmp");
|
||||
current_config = cmd(proc, "show run | grep ^telnet|^ssh|^icmp");
|
||||
if (state==FINISH) return;
|
||||
current_config+=cmd(proc,"show object-group");
|
||||
current_config += cmd(proc, "show object-group");
|
||||
if (state==FINISH) return;
|
||||
current_config+=cmd(proc,"show access-list");
|
||||
current_config += cmd(proc, "show access-list");
|
||||
if (state==FINISH) return;
|
||||
current_config+=cmd(proc,"show global");
|
||||
current_config += cmd(proc, "show global");
|
||||
if (state==FINISH) return;
|
||||
current_config+=cmd(proc,"show nat");
|
||||
current_config += cmd(proc, "show nat");
|
||||
if (state==FINISH) return;
|
||||
current_config+=cmd(proc,"show static");
|
||||
current_config += cmd(proc, "show static");
|
||||
if (state==FINISH) return;
|
||||
|
||||
verbose=sv;
|
||||
|
@ -38,12 +38,13 @@
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
||||
|
||||
class QEventLoop;
|
||||
|
||||
class SSHPIX : public SSHSession {
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
QEventLoop *local_event_loop;
|
||||
int nLines;
|
||||
int ncmd;
|
||||
QStringList allConfig;
|
||||
|
@ -400,13 +400,6 @@ void SSHSession::readFromStdout()
|
||||
{
|
||||
if (proc)
|
||||
{
|
||||
if (fwbdebug)
|
||||
{
|
||||
QTime t = QTime::currentTime();
|
||||
qDebug(QString("SSHSession::readFromStdout() on entry: %1").
|
||||
arg(t.toString("hh:mm:ss.zzz")).toAscii().constData());
|
||||
}
|
||||
|
||||
QByteArray ba = proc->readAllStandardOutput();
|
||||
int basize = ba.size();
|
||||
if (basize==0) return;
|
||||
@ -421,13 +414,6 @@ void SSHSession::readFromStdout()
|
||||
// split on LF
|
||||
QStringList bufLines = buf.split("\n", QString::KeepEmptyParts);
|
||||
|
||||
if (fwbdebug)
|
||||
{
|
||||
QTime t = QTime::currentTime();
|
||||
qDebug(QString("SSHSession::readFromStdout() on check 1: %1").
|
||||
arg(t.toString("hh:mm:ss.zzz")).toAscii().constData());
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (fwbdebug)
|
||||
{
|
||||
@ -465,22 +451,7 @@ void SSHSession::readFromStdout()
|
||||
|
||||
pendingLogLine += lastLine;
|
||||
|
||||
if (fwbdebug)
|
||||
{
|
||||
QTime t = QTime::currentTime();
|
||||
qDebug(QString("SSHSession::readFromStdout() on check 2: %1").
|
||||
arg(t.toString("hh:mm:ss.zzz")).toAscii().constData());
|
||||
}
|
||||
|
||||
stateMachine();
|
||||
|
||||
if (fwbdebug)
|
||||
{
|
||||
QTime t = QTime::currentTime();
|
||||
qDebug(QString("SSHSession::readFromStdout() finish: %1").
|
||||
arg(t.toString("hh:mm:ss.zzz")).toAscii().constData());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -510,6 +481,7 @@ void SSHSession::readFromStderr()
|
||||
void SSHSession::sessionComplete(bool err)
|
||||
{
|
||||
if (fwbdebug) qDebug("SSHSession::sessionComplete err=%d", err);
|
||||
heartBeatTimer->disconnect(SIGNAL(timeout()));
|
||||
|
||||
error = err;
|
||||
if (error)
|
||||
@ -521,8 +493,8 @@ void SSHSession::sessionComplete(bool err)
|
||||
void SSHSession::finished(int retcode)
|
||||
{
|
||||
if (fwbdebug) qDebug("SSHSession::processExited");
|
||||
|
||||
if (fwbdebug) qDebug("SSHSession::processExited proc=%p retcode=%d",proc,retcode);
|
||||
if (fwbdebug) qDebug("SSHSession::processExited proc=%p retcode=%d",
|
||||
proc, retcode);
|
||||
|
||||
// background process has exited now, we do not need proc object anymore
|
||||
delete proc;
|
||||
@ -530,7 +502,8 @@ void SSHSession::finished(int retcode)
|
||||
|
||||
QString exitStatus = (retcode)?QObject::tr("ERROR"):QObject::tr("OK");
|
||||
|
||||
emit printStdout_sign(tr("SSH session terminated, exit status: %1").arg(retcode) + "\n");
|
||||
emit printStdout_sign(tr("SSH session terminated, exit status: %1").arg(
|
||||
retcode) + "\n");
|
||||
sessionComplete( retcode!=0 );
|
||||
// if (retcode) error=true;
|
||||
// emit sessionFinished_sign();
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -106,6 +106,9 @@ HEADERS += ../../config.h \
|
||||
PrefsDialog.h \
|
||||
instConf.h \
|
||||
instDialog.h \
|
||||
FirewallInstaller.h \
|
||||
FirewallInstallerCisco.h \
|
||||
FirewallInstallerUnx.h \
|
||||
newFirewallDialog.h \
|
||||
newHostDialog.h \
|
||||
ObjConflictResolutionDialog.h \
|
||||
@ -216,6 +219,12 @@ SOURCES += ProjectPanel.cpp \
|
||||
PrefsDialog.cpp \
|
||||
instConf.cpp \
|
||||
instDialog.cpp \
|
||||
instDialog_ui_ops.cpp \
|
||||
instDialog_compile.cpp \
|
||||
instDialog_installer.cpp \
|
||||
FirewallInstaller.cpp \
|
||||
FirewallInstallerCisco.cpp \
|
||||
FirewallInstallerUnx.cpp \
|
||||
newFirewallDialog.cpp \
|
||||
newHostDialog.cpp \
|
||||
ObjConflictResolutionDialog.cpp \
|
||||
|
@ -46,22 +46,7 @@ using namespace libfwbuilder;
|
||||
|
||||
instConf::instConf()
|
||||
{
|
||||
quiet=false;
|
||||
verbose=false;
|
||||
debug=0;
|
||||
incremental=false;
|
||||
dry_run=false;
|
||||
saveStandby=false;
|
||||
save_diff=false;
|
||||
diff_pgm="";
|
||||
no_gui=false;
|
||||
backup=false;
|
||||
backup_file="";
|
||||
wdir="./";
|
||||
fwobj=NULL;
|
||||
maddr="";
|
||||
user="";
|
||||
batchInstall=false;
|
||||
clear();
|
||||
}
|
||||
|
||||
QString instConf::getCmdFromResource(const QString &resource_name)
|
||||
@ -87,3 +72,25 @@ QString instConf::getCmdFromResource(const QString &resource_name)
|
||||
return cmd;
|
||||
}
|
||||
|
||||
void instConf::clear()
|
||||
{
|
||||
quiet = false;
|
||||
verbose = false;
|
||||
debug = 0;
|
||||
incremental = false;
|
||||
dry_run = false;
|
||||
saveStandby = false;
|
||||
save_diff = false;
|
||||
diff_pgm = "";
|
||||
no_gui = false;
|
||||
backup = false;
|
||||
backup_file = "";
|
||||
wdir = "./";
|
||||
fwobj = NULL;
|
||||
maddr = "";
|
||||
user = "";
|
||||
batchInstall = false;
|
||||
sshArgs = "";
|
||||
scpArgs = "";
|
||||
}
|
||||
|
||||
|
@ -63,6 +63,7 @@ class instConf {
|
||||
QString epwd;
|
||||
QString maddr;
|
||||
QString sshArgs;
|
||||
QString scpArgs;
|
||||
QString fwdir;
|
||||
int rollbackTime;
|
||||
QString rollbackTimeUnit;
|
||||
@ -77,7 +78,7 @@ class instConf {
|
||||
instConf();
|
||||
|
||||
QString getCmdFromResource(const QString &resource_name);
|
||||
|
||||
void clear();
|
||||
|
||||
};
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -35,6 +35,7 @@
|
||||
#include "fakeWizard.h"
|
||||
|
||||
#include "instOptionsDialog.h"
|
||||
#include "FirewallInstaller.h"
|
||||
|
||||
#include <qstring.h>
|
||||
#include <qstringlist.h>
|
||||
@ -45,8 +46,9 @@
|
||||
#include <map>
|
||||
#include <list>
|
||||
|
||||
class FirewallInstaller;
|
||||
|
||||
class QEventLoop;
|
||||
class SSHSession;
|
||||
class QTextEdit;
|
||||
class QListViewItem;
|
||||
class QCheckListItem;
|
||||
@ -60,79 +62,51 @@ namespace libfwbuilder
|
||||
class Firewall;
|
||||
}
|
||||
|
||||
enum BatchOperation {BATCH_INSTALL,BATCH_COMPILE} ;
|
||||
enum BatchOperation {BATCH_INSTALL, BATCH_COMPILE} ;
|
||||
enum Page1Operation {COMPILE, INSTALL};
|
||||
|
||||
typedef std::map<libfwbuilder::Firewall *,QTreeWidgetItem *> t_listMap;
|
||||
typedef std::map<libfwbuilder::Firewall *,QTableWidgetItem *> t_tableMap;
|
||||
typedef std::list<libfwbuilder::Firewall *> t_fwList;
|
||||
typedef std::pair<QString,QString> t_procMess; // first - compilation result, second - installation result;
|
||||
typedef std::set<libfwbuilder::Firewall*> t_fwSet;
|
||||
|
||||
|
||||
class instDialog : public QDialog, public FakeWizard
|
||||
{
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
Ui::instDialog_q *m_dialog;
|
||||
bool ready;
|
||||
bool activationCommandDone;
|
||||
instConf cnf;
|
||||
|
||||
QString ssh;
|
||||
|
||||
QString confScript;
|
||||
QStringList confFiles;
|
||||
|
||||
QString fwb_prompt;
|
||||
|
||||
QString newKeyMsg;
|
||||
|
||||
int phase;
|
||||
|
||||
QString replaceMacrosInCommand(const QString &cmd);
|
||||
QString getActivationCmd();
|
||||
//libfwbuilder::Firewall * firewall;
|
||||
t_fwSet reqFirewalls;
|
||||
|
||||
|
||||
// session is used when e run built-in installer
|
||||
SSHSession *session;
|
||||
|
||||
instConf cnf;
|
||||
Page1Operation page_1_op;
|
||||
FirewallInstaller *installer;
|
||||
|
||||
// proc is used to launch external oprocess, such as compiler or
|
||||
// user-defined installer script
|
||||
QProcess proc;
|
||||
|
||||
std::map<libfwbuilder::Firewall *, t_procMess> processedFirewalls;
|
||||
|
||||
t_fwList firewalls;
|
||||
t_fwList opList;
|
||||
|
||||
t_fwList::iterator opListIterator;
|
||||
|
||||
t_listMap opListMapping;
|
||||
t_tableMap compileMapping;
|
||||
t_tableMap installMapping;
|
||||
QString fwb_prompt;
|
||||
|
||||
QString path; //path of the program to execute
|
||||
QStringList args; //arguments for that program
|
||||
t_fwSet reqFirewalls;
|
||||
|
||||
t_fwList firewalls;
|
||||
|
||||
std::list<libfwbuilder::Firewall*> compile_fw_list;
|
||||
std::list<libfwbuilder::Firewall*>::size_type compile_list_initial_size;
|
||||
std::list<libfwbuilder::Firewall*> install_fw_list;
|
||||
std::list<libfwbuilder::Firewall*>::size_type install_list_initial_size;
|
||||
|
||||
std::map<int,QTreeWidgetItem*> opListMapping;
|
||||
|
||||
t_tableMap compileMapping;
|
||||
t_tableMap installMapping;
|
||||
|
||||
QString path; //path of the program to execute
|
||||
QStringList args; //arguments for that program
|
||||
|
||||
QTextEdit *currentLog;
|
||||
QPushButton *currentSaveButton;
|
||||
QPushButton *currentStopButton;
|
||||
QProgressBar *currentProgressBar;
|
||||
QProgressBar *currentFirewallsBar;
|
||||
QLabel *currentLabel;
|
||||
QLabel *currentFWLabel;
|
||||
QString currentSearchString;
|
||||
bool creatingTable;
|
||||
bool creatingTable;
|
||||
|
||||
BatchOperation operation;
|
||||
instOptionsDialog *dlg;
|
||||
QString pendingLogLine;
|
||||
BatchOperation operation;
|
||||
|
||||
int progress;
|
||||
int totalRules;
|
||||
int processedRules;
|
||||
int lastPage;
|
||||
bool stopProcessFlag;
|
||||
@ -141,62 +115,96 @@ class instDialog : public QDialog, public FakeWizard
|
||||
bool customScriptFlag;
|
||||
bool showSelectedFlag;
|
||||
|
||||
QTextEdit *currentLog;
|
||||
QPushButton *currentSaveButton;
|
||||
QPushButton *currentStopButton;
|
||||
QProgressBar *currentProgressBar;
|
||||
QProgressBar *currentFirewallsBar;
|
||||
QLabel *currentLabel;
|
||||
QLabel *currentFWLabel;
|
||||
QString currentSearchString;
|
||||
|
||||
|
||||
void fillCompileSelectList();
|
||||
void selectAll(t_tableMap &mapping);
|
||||
void deselectAll(t_tableMap &mappin);
|
||||
|
||||
void fillCompileOpList();
|
||||
void fillLastList();
|
||||
bool doInstallPage(libfwbuilder::Firewall*);
|
||||
void resetInstallSSHSession();
|
||||
bool testFirewall(libfwbuilder::Firewall*);
|
||||
void finishInstall(bool success=true);
|
||||
void fillCompileUIList();
|
||||
void fillInstallOpList();
|
||||
void installNext();
|
||||
void initInstall();
|
||||
void analyseInstallQueue(bool &fPix, bool &fCustInst);
|
||||
void fillInstallUIList();
|
||||
|
||||
bool testFirewall(libfwbuilder::Firewall*);
|
||||
|
||||
//void analyseInstallQueue(bool &fPix, bool &fCustInst);
|
||||
libfwbuilder::Firewall *findFirewallbyListItem(QTreeWidgetItem* item);
|
||||
libfwbuilder::Firewall *findFirewallbyTableItem(QTableWidgetItem *item);
|
||||
|
||||
|
||||
void setSuccessState(QTreeWidgetItem *item);
|
||||
void setFailureState(QTreeWidgetItem *item);
|
||||
void setErrorState(QTreeWidgetItem *item);
|
||||
void setInProcessState(QTreeWidgetItem *item);
|
||||
|
||||
public:
|
||||
|
||||
instDialog(QWidget* p, BatchOperation op, t_fwSet reqFirewalls_);
|
||||
virtual ~instDialog();
|
||||
|
||||
void setReady(bool f) { ready=f; }
|
||||
|
||||
void summary();
|
||||
|
||||
void opSuccess(libfwbuilder::Firewall *fw);
|
||||
void opError(libfwbuilder::Firewall *fw);
|
||||
void opCancelled(libfwbuilder::Firewall *fw);
|
||||
|
||||
QWidget* page(int n) { return m_dialog->stackedWidget->widget(n); }
|
||||
|
||||
void initiateCopy(const QString &file);
|
||||
void runSSH(SSHSession *s);
|
||||
void displayCommand(const QStringList &args);
|
||||
bool runCompile(libfwbuilder::Firewall *fw);
|
||||
bool runInstall(libfwbuilder::Firewall *fw);
|
||||
bool runCompiler(libfwbuilder::Firewall *fw);
|
||||
bool runInstaller(libfwbuilder::Firewall *fw);
|
||||
|
||||
bool prepareArgForCompiler(libfwbuilder::Firewall *fw);
|
||||
bool isTableHasChecked();
|
||||
bool tableHasChecked();
|
||||
void clearReqFirewalls();
|
||||
void addReqFirewall(libfwbuilder::Firewall *f);
|
||||
void interpretLogLine(const QString &buf);
|
||||
QString replaceMacrosInCommand(const QString &cmd);
|
||||
QString getActivationCmd();
|
||||
|
||||
void enableStopButton();
|
||||
void disableStopButton();
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
void executeCommand(QStringList &args);
|
||||
|
||||
virtual void showEvent( QShowEvent *ev);
|
||||
virtual void hideEvent( QHideEvent *ev);
|
||||
virtual void prepareInstallerOptions();
|
||||
|
||||
bool getInstOptions(libfwbuilder::Firewall *fw);
|
||||
bool getBatchInstOptions();
|
||||
|
||||
virtual void prepareInstConf(libfwbuilder::Firewall *fw);
|
||||
virtual void storeInstallerOptions();
|
||||
virtual void findFirewalls();
|
||||
void prepareInstConf(libfwbuilder::Firewall *fw);
|
||||
|
||||
QString getFullPath(instConf &cnf, const QString &file );
|
||||
void blockInstallForFirewall(libfwbuilder::Firewall *fw);
|
||||
|
||||
protected slots:
|
||||
void processExited(int code);
|
||||
void readInstallerOptionsFromSettings();
|
||||
void readInstallerOptionsFromFirewallObject(libfwbuilder::Firewall *fw);
|
||||
void readInstallerOptionsFromDialog(libfwbuilder::Firewall *fw,
|
||||
instOptionsDialog *dlg);
|
||||
void completeInstallerOptions();
|
||||
|
||||
void storeInstallerOptions();
|
||||
void findFirewalls();
|
||||
|
||||
bool isCiscoFamily();
|
||||
|
||||
void interpretLogLine(const QString &buf);
|
||||
|
||||
public slots:
|
||||
|
||||
void compilerFinished(int ret_code, QProcess::ExitStatus);
|
||||
void installerFinished(int ret_code, QProcess::ExitStatus);
|
||||
void installerSuccess();
|
||||
void installerError();
|
||||
void installSelected();
|
||||
|
||||
void showPage(const int page);
|
||||
|
||||
void finishClicked();
|
||||
@ -207,30 +215,26 @@ protected:
|
||||
void addToLog(const QString &buf);
|
||||
void updateProgressBar(int n,bool setsize);
|
||||
|
||||
virtual void saveLog();
|
||||
virtual void togleDetailMC();
|
||||
void saveLog();
|
||||
void togleDetailMC();
|
||||
|
||||
virtual void readFromStdout();
|
||||
void readFromStdout();
|
||||
//virtual void readFromStderr();
|
||||
virtual void selectAllFirewalls();
|
||||
virtual void deselectAllFirewalls();
|
||||
void selectAllFirewalls();
|
||||
void deselectAllFirewalls();
|
||||
|
||||
virtual void nextClicked();
|
||||
virtual void backClicked();
|
||||
void nextClicked();
|
||||
void backClicked();
|
||||
|
||||
void stopSessionAndDisconnectSignals();
|
||||
void continueRun();
|
||||
void restartSession();
|
||||
void sessionCleanupOnError();
|
||||
void mainLoopCompile();
|
||||
void mainLoopInstall();
|
||||
|
||||
void compileSelected();
|
||||
void stopCompile();
|
||||
void stopInstall();
|
||||
void findFirewallInCompileLog(QTreeWidgetItem*);
|
||||
void showSelected();
|
||||
void tableValueChanged(int row, int col);
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
264
src/gui/instDialog_compile.cpp
Normal file
264
src/gui/instDialog_compile.cpp
Normal file
@ -0,0 +1,264 @@
|
||||
/*
|
||||
|
||||
Firewall Builder
|
||||
|
||||
Copyright (C) 2008 NetCitadel, LLC
|
||||
|
||||
Author: Vadim Kurland vadim@fwbuilder.org
|
||||
|
||||
$Id$
|
||||
|
||||
This program is free software which we release under the GNU General Public
|
||||
License. You may redistribute and/or modify this program under the terms
|
||||
of that license as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
To get a copy of the GNU General Public License, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
#include "../../config.h"
|
||||
#include "global.h"
|
||||
#include "utils.h"
|
||||
#include "utils_no_qt.h"
|
||||
|
||||
#include "instDialog.h"
|
||||
#include "FWBSettings.h"
|
||||
#include "FWWindow.h"
|
||||
#include "InstallFirewallViewItem.h"
|
||||
#include "instOptionsDialog.h"
|
||||
#include "instBatchOptionsDialog.h"
|
||||
|
||||
#include "fwbuilder/Resources.h"
|
||||
#include "fwbuilder/FWObjectDatabase.h"
|
||||
#include "fwbuilder/Firewall.h"
|
||||
#include "fwbuilder/XMLTools.h"
|
||||
#include "fwbuilder/Interface.h"
|
||||
#include "fwbuilder/Management.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
# include <unistd.h> // for access(2) and getdomainname
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
using namespace libfwbuilder;
|
||||
|
||||
|
||||
bool instDialog::runCompiler(Firewall *fw)
|
||||
{
|
||||
if (fwbdebug)
|
||||
{
|
||||
qDebug("instDialog::runCompile");
|
||||
qDebug(("Firewall:"+fw->getName()).c_str());
|
||||
}
|
||||
// store pointer to the firewall so we can use it in
|
||||
// slot compilerFinished
|
||||
cnf.fwobj = fw;
|
||||
|
||||
currentSearchString = tr("Compiling rule sets for firewall: ");
|
||||
currentFirewallsBar->setValue(compile_list_initial_size -
|
||||
compile_fw_list.size());
|
||||
currentProgressBar->reset();
|
||||
currentProgressBar->setFormat("%v/%m");
|
||||
|
||||
QTreeWidgetItem* item = opListMapping[fw->getId()];
|
||||
assert(item!=NULL);
|
||||
|
||||
currentFWLabel->setText(QString::fromUtf8(fw->getName().c_str()));
|
||||
m_dialog->fwWorkList->scrollToItem(item);
|
||||
setInProcessState(item);
|
||||
item->setText(1, tr("Compiling ..."));
|
||||
currentLabel->setText(tr("Compiling ..."));
|
||||
|
||||
qApp->processEvents();
|
||||
|
||||
addToLog("\n");
|
||||
addToLog(
|
||||
QObject::tr("Compiling rule sets for firewall: %1\n").
|
||||
arg(QString::fromUtf8(fw->getName().c_str()))
|
||||
);
|
||||
|
||||
if (!prepareArgForCompiler(fw)) return false;
|
||||
|
||||
addToLog( args.join(" ") + "\n" );
|
||||
|
||||
// Launch compiler in the background
|
||||
QString path = args.at(0);
|
||||
args.pop_front();
|
||||
|
||||
disconnect(currentStopButton, SIGNAL(clicked()) );
|
||||
connect(currentStopButton, SIGNAL(clicked()),
|
||||
this, SLOT(stopCompile()));
|
||||
|
||||
proc.disconnect(SIGNAL(finished(int,QProcess::ExitStatus)));
|
||||
connect(&proc, SIGNAL(finished(int,QProcess::ExitStatus)),
|
||||
this, SLOT(compilerFinished(int,QProcess::ExitStatus)) );
|
||||
|
||||
proc.start(path, args);
|
||||
|
||||
currentStopButton->setText(tr("Stop"));
|
||||
currentStopButton->setEnabled(true);
|
||||
|
||||
if ( !proc.waitForStarted() )
|
||||
{
|
||||
opError(cnf.fwobj);
|
||||
addToLog( tr("Error: Failed to start program") );
|
||||
blockInstallForFirewall(cnf.fwobj);
|
||||
QTimer::singleShot( 0, this, SLOT(mainLoopCompile()));
|
||||
return false;
|
||||
}
|
||||
args.push_front(path);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void instDialog::stopCompile()
|
||||
{
|
||||
if( fwbdebug) qDebug("instDialog::stopCompile");
|
||||
stopProcessFlag = true;
|
||||
|
||||
disconnect(currentStopButton, SIGNAL(clicked()) );
|
||||
currentStopButton->setEnabled(false);
|
||||
|
||||
proc.terminate(); //try to close proc.
|
||||
QTimer::singleShot( 1000, &proc, SLOT( kill() ) ); //if it doesn't respond, kill it
|
||||
|
||||
blockInstallForFirewall(cnf.fwobj);
|
||||
|
||||
// to terminate whole compile sequence rather than just current
|
||||
// compiler process, clear the list.
|
||||
for (list<Firewall*>::iterator i=compile_fw_list.begin();
|
||||
i!=compile_fw_list.end(); ++i)
|
||||
{
|
||||
opCancelled(*i);
|
||||
blockInstallForFirewall(*i);
|
||||
}
|
||||
|
||||
compile_fw_list.clear();
|
||||
}
|
||||
|
||||
bool instDialog::prepareArgForCompiler(Firewall *fw)
|
||||
{
|
||||
FWOptions *fwopt = fw->getOptionsObject();
|
||||
|
||||
/*
|
||||
* I should be able to specify custom compiler for firewall with
|
||||
* no platform (e.g. for experiments)
|
||||
*/
|
||||
string compiler = fwopt->getStr("compiler");
|
||||
if (compiler=="")
|
||||
{
|
||||
compiler=Resources::platform_res[fw->getStr("platform")]->getCompiler();
|
||||
}
|
||||
|
||||
if (compiler=="")
|
||||
{
|
||||
QMessageBox::warning(
|
||||
this,"Firewall Builder",
|
||||
tr("Firewall platform is not specified in this object.\n\
|
||||
Can't compile firewall policy."),
|
||||
tr("&Continue"), QString::null,QString::null,
|
||||
0, 1 );
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* On Unix compilers are installed in the standard place and are
|
||||
* accessible via PATH. On Windows and Mac they get installed in
|
||||
* unpredictable directories and need to be found
|
||||
*
|
||||
* first, check if user specified an absolute path for the compiler,
|
||||
* then check if compiler is registsred in preferences, and if not,
|
||||
* look for it in appRootDir and if it is not there, rely on PATH
|
||||
*/
|
||||
#if defined(Q_OS_WIN32) || defined(Q_OS_MACX)
|
||||
|
||||
if ( ! QFile::exists( compiler.c_str() ) )
|
||||
{
|
||||
string ts = string("Compilers/")+compiler;
|
||||
QString cmppath = st->getStr( ts.c_str() );
|
||||
if (!cmppath.isEmpty()) compiler=cmppath.toLatin1().constData();
|
||||
else
|
||||
{
|
||||
/* try to find compiler in appRootDir. */
|
||||
string ts = getPathToBinary(compiler);
|
||||
|
||||
if (fwbdebug) qDebug("Checking compiler in %s", ts.c_str());
|
||||
|
||||
if ( QFile::exists( ts.c_str() ) )
|
||||
compiler = ts;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
QString wdir = getFileDir(mw->getRCS()->getFileName() );
|
||||
|
||||
args.clear();
|
||||
|
||||
args.push_back(compiler.c_str());
|
||||
|
||||
QString qs = fwopt->getStr("cmdline").c_str();
|
||||
args += qs.split(" ", QString::SkipEmptyParts);
|
||||
|
||||
args.push_back("-v");
|
||||
args.push_back("-f");
|
||||
args.push_back(mw->db()->getFileName().c_str());
|
||||
|
||||
if (wdir!="")
|
||||
{
|
||||
args.push_back("-d");
|
||||
args.push_back(wdir);
|
||||
}
|
||||
|
||||
QString ofname = QString::fromUtf8(fwopt->getStr("output_file").c_str());
|
||||
if (!ofname.isEmpty())
|
||||
{
|
||||
args.push_back("-o");
|
||||
args.push_back(ofname);
|
||||
}
|
||||
|
||||
args.push_back("-i");
|
||||
|
||||
args.push_back( mw->db()->getStringId(fw->getId()).c_str() );
|
||||
return true;
|
||||
}
|
||||
|
||||
void instDialog::compilerFinished(int ret_code, QProcess::ExitStatus status)
|
||||
{
|
||||
if( fwbdebug) qDebug("instDialog::compilerFinished "
|
||||
"exit code = %d exit_status=%d",
|
||||
ret_code, status);
|
||||
|
||||
readFromStdout();
|
||||
|
||||
if (rejectDialogFlag)
|
||||
{
|
||||
rejectDialogFlag = false;
|
||||
QDialog::reject();
|
||||
return;
|
||||
}
|
||||
|
||||
if (ret_code==0 && status==QProcess::NormalExit)
|
||||
{
|
||||
opSuccess(cnf.fwobj);
|
||||
mw->updateLastCompiledTimestamp(cnf.fwobj);
|
||||
}
|
||||
else
|
||||
{
|
||||
blockInstallForFirewall(cnf.fwobj);
|
||||
opError(cnf.fwobj);
|
||||
}
|
||||
currentProgressBar->setValue(currentProgressBar->maximum());
|
||||
|
||||
QTimer::singleShot( 0, this, SLOT(mainLoopCompile()));
|
||||
return;
|
||||
}
|
188
src/gui/instDialog_installer.cpp
Normal file
188
src/gui/instDialog_installer.cpp
Normal file
@ -0,0 +1,188 @@
|
||||
/*
|
||||
|
||||
Firewall Builder
|
||||
|
||||
Copyright (C) 2008 NetCitadel, LLC
|
||||
|
||||
Author: Vadim Kurland vadim@fwbuilder.org
|
||||
|
||||
$Id$
|
||||
|
||||
This program is free software which we release under the GNU General Public
|
||||
License. You may redistribute and/or modify this program under the terms
|
||||
of that license as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
To get a copy of the GNU General Public License, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
#include "../../config.h"
|
||||
#include "global.h"
|
||||
#include "utils.h"
|
||||
#include "utils_no_qt.h"
|
||||
|
||||
#include "instDialog.h"
|
||||
#include "FirewallInstallerCisco.h"
|
||||
#include "FirewallInstallerUnx.h"
|
||||
|
||||
#include "FWBSettings.h"
|
||||
#include "FWWindow.h"
|
||||
#include "InstallFirewallViewItem.h"
|
||||
#include "instOptionsDialog.h"
|
||||
#include "instBatchOptionsDialog.h"
|
||||
|
||||
#include "fwbuilder/Resources.h"
|
||||
#include "fwbuilder/FWObjectDatabase.h"
|
||||
#include "fwbuilder/Firewall.h"
|
||||
#include "fwbuilder/XMLTools.h"
|
||||
#include "fwbuilder/Interface.h"
|
||||
#include "fwbuilder/Management.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
# include <unistd.h> // for access(2) and getdomainname
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
using namespace libfwbuilder;
|
||||
|
||||
bool instDialog::runInstaller(Firewall *fw)
|
||||
{
|
||||
if (fwbdebug) qDebug("instDialog::runInstaller");
|
||||
|
||||
cnf.fwobj = fw;
|
||||
cnf.maddr = "";
|
||||
|
||||
if (!getInstOptions(fw))
|
||||
{
|
||||
QTimer::singleShot( 0, this, SLOT(mainLoopInstall()));
|
||||
return false;
|
||||
}
|
||||
|
||||
args.clear();
|
||||
|
||||
/* need to save settings so that if the user just changed ssh/scp, the
|
||||
* wrapper will pick changes up
|
||||
*/
|
||||
st->save();
|
||||
|
||||
summary();
|
||||
|
||||
if (testFirewall(fw))
|
||||
{
|
||||
setTitle(
|
||||
1,
|
||||
QObject::tr("Installing policy rules on firewall '%1'").
|
||||
arg(QString::fromUtf8(fw->getName().c_str() )));
|
||||
|
||||
currentSearchString = tr("Install firewall: ");
|
||||
currentFirewallsBar->setValue(install_list_initial_size -
|
||||
install_fw_list.size());
|
||||
currentProgressBar->reset();
|
||||
currentProgressBar->setFormat("%v/%m");
|
||||
|
||||
QTreeWidgetItem* item = opListMapping[fw->getId()];
|
||||
assert(item!=NULL);
|
||||
|
||||
currentFWLabel->setText(QString::fromUtf8(fw->getName().c_str()));
|
||||
m_dialog->fwWorkList->scrollToItem(item);
|
||||
setInProcessState(item);
|
||||
item->setText(1, tr("Installing ..."));
|
||||
currentLabel->setText(tr("Installing ..."));
|
||||
|
||||
qApp->processEvents();
|
||||
|
||||
addToLog("\n");
|
||||
|
||||
if (fwbdebug) qDebug("built-in installer firewall %s",
|
||||
fw->getName().c_str());
|
||||
|
||||
if (installer!=NULL)
|
||||
delete installer;
|
||||
|
||||
if (isCiscoFamily())
|
||||
installer = new FirewallInstallerCisco(this, &cnf, fwb_prompt);
|
||||
else
|
||||
installer = new FirewallInstallerUnx(this, &cnf, fwb_prompt);
|
||||
|
||||
if (!installer->packInstallJobsList(fw))
|
||||
{
|
||||
QTimer::singleShot( 0, this, SLOT(mainLoopInstall()));
|
||||
return false;
|
||||
}
|
||||
|
||||
currentProgressBar->setValue(0);
|
||||
|
||||
disconnect(currentStopButton, SIGNAL(clicked()));
|
||||
connect(currentStopButton, SIGNAL(clicked()),
|
||||
this, SLOT(stopInstall()));
|
||||
|
||||
installer->runJobs();
|
||||
}
|
||||
else
|
||||
{
|
||||
opListMapping[fw->getId()]->setText(1, tr("Failure"));
|
||||
setFailureState(opListMapping[fw->getId()]);
|
||||
|
||||
QTimer::singleShot( 0, this, SLOT(mainLoopInstall()));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void instDialog::stopInstall()
|
||||
{
|
||||
currentStopButton->setEnabled(false);
|
||||
stopProcessFlag=true;
|
||||
|
||||
disconnect(currentStopButton, SIGNAL(clicked()) );
|
||||
currentStopButton->setEnabled(false);
|
||||
|
||||
proc.terminate(); //try to close proc.
|
||||
QTimer::singleShot( 1000, &proc, SLOT( kill() ) ); //if it doesn't respond, kill it
|
||||
|
||||
// to terminate whole install sequence rather than just current
|
||||
// process, clear the list.
|
||||
for (list<Firewall*>::iterator i=install_fw_list.begin();
|
||||
i!=install_fw_list.end(); ++i)
|
||||
opCancelled(*i);
|
||||
|
||||
install_fw_list.clear();
|
||||
setFinishEnabled(currentPage(), true);
|
||||
}
|
||||
|
||||
void instDialog::installerFinished(int ret_code, QProcess::ExitStatus status)
|
||||
{
|
||||
if( fwbdebug) qDebug("instDialog::installerFinished "
|
||||
"exit code = %d exit_status=%d",
|
||||
ret_code, status);
|
||||
|
||||
if (ret_code==0 && status==QProcess::NormalExit)
|
||||
installerSuccess();
|
||||
else
|
||||
installerError();
|
||||
}
|
||||
|
||||
void instDialog::installerSuccess()
|
||||
{
|
||||
opSuccess(cnf.fwobj);
|
||||
mw->updateLastInstalledTimestamp(cnf.fwobj);
|
||||
currentProgressBar->setValue(currentProgressBar->maximum());
|
||||
QTimer::singleShot( 1000, this, SLOT(mainLoopInstall()));
|
||||
}
|
||||
|
||||
void instDialog::installerError()
|
||||
{
|
||||
opError(cnf.fwobj);
|
||||
currentProgressBar->setValue(currentProgressBar->maximum());
|
||||
QTimer::singleShot( 0, this, SLOT(mainLoopInstall()));
|
||||
}
|
||||
|
1079
src/gui/instDialog_ui_ops.cpp
Normal file
1079
src/gui/instDialog_ui_ops.cpp
Normal file
@ -0,0 +1,1079 @@
|
||||
/*
|
||||
|
||||
Firewall Builder
|
||||
|
||||
Copyright (C) 2008 NetCitadel, LLC
|
||||
|
||||
Author: Vadim Kurland vadim@fwbuilder.org
|
||||
|
||||
$Id$
|
||||
|
||||
This program is free software which we release under the GNU General Public
|
||||
License. You may redistribute and/or modify this program under the terms
|
||||
of that license as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
To get a copy of the GNU General Public License, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
#include "../../config.h"
|
||||
#include "global.h"
|
||||
#include "utils.h"
|
||||
#include "utils_no_qt.h"
|
||||
|
||||
#include "instDialog.h"
|
||||
#include "FirewallInstaller.h"
|
||||
#include "FWBSettings.h"
|
||||
#include "FWWindow.h"
|
||||
#include "InstallFirewallViewItem.h"
|
||||
#include "instOptionsDialog.h"
|
||||
#include "instBatchOptionsDialog.h"
|
||||
|
||||
#include <qcheckbox.h>
|
||||
#include <qlineedit.h>
|
||||
#include <qtextedit.h>
|
||||
#include <qtimer.h>
|
||||
#include <qfiledialog.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qlabel.h>
|
||||
#include <qprogressbar.h>
|
||||
#include <qprocess.h>
|
||||
#include <qapplication.h>
|
||||
#include <qeventloop.h>
|
||||
#include <qfile.h>
|
||||
#include <qdir.h>
|
||||
#include <qmessagebox.h>
|
||||
#include <qspinbox.h>
|
||||
#include <qgroupbox.h>
|
||||
#include <qcolor.h>
|
||||
#include <qtablewidget.h>
|
||||
#include <qtextcodec.h>
|
||||
#include <qfileinfo.h>
|
||||
#include <qtextstream.h>
|
||||
#include <QDateTime>
|
||||
|
||||
#include "fwbuilder/Resources.h"
|
||||
#include "fwbuilder/FWObjectDatabase.h"
|
||||
#include "fwbuilder/Firewall.h"
|
||||
#include "fwbuilder/XMLTools.h"
|
||||
#include "fwbuilder/Interface.h"
|
||||
#include "fwbuilder/Management.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
# include <unistd.h> // for access(2) and getdomainname
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
using namespace libfwbuilder;
|
||||
|
||||
void instDialog::enableStopButton()
|
||||
{
|
||||
currentStopButton->setText(tr("Stop"));
|
||||
currentStopButton->setEnabled(true);
|
||||
}
|
||||
|
||||
void instDialog::disableStopButton()
|
||||
{
|
||||
currentStopButton->setEnabled(false);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* The following color and font manipulations are subject to QT bug
|
||||
* http://trolltech.no/developer/task-tracker/index_html?method=entry&id=212207
|
||||
*
|
||||
* This requires QT 4.4.1 or 4.3
|
||||
*/
|
||||
void instDialog::setSuccessState(QTreeWidgetItem *item)
|
||||
{
|
||||
QBrush b = item->foreground(1);
|
||||
b.setColor(Qt::darkGreen);
|
||||
item->setForeground(1,b);
|
||||
item->setForeground(0,b);
|
||||
|
||||
QFont f = item->font(1);
|
||||
f.setBold(true);
|
||||
item->setFont(1,f);
|
||||
item->setFont(0,f);
|
||||
}
|
||||
|
||||
void instDialog::setFailureState(QTreeWidgetItem *item)
|
||||
{
|
||||
QBrush b = item->foreground(1);
|
||||
b.setColor(Qt::darkRed);
|
||||
item->setForeground(1,b);
|
||||
item->setForeground(0,b);
|
||||
|
||||
QFont f = item->font(1);
|
||||
f.setBold(true);
|
||||
item->setFont(1,f);
|
||||
item->setFont(0,f);
|
||||
}
|
||||
|
||||
void instDialog::setErrorState(QTreeWidgetItem *item)
|
||||
{
|
||||
QBrush b = item->foreground(1);
|
||||
b.setColor(Qt::darkRed);
|
||||
item->setForeground(1,b);
|
||||
item->setForeground(0,b);
|
||||
|
||||
QFont f = item->font(1);
|
||||
f.setBold(true);
|
||||
item->setFont(1,f);
|
||||
item->setFont(0,f);
|
||||
}
|
||||
|
||||
void instDialog::setInProcessState(QTreeWidgetItem *item)
|
||||
{
|
||||
QBrush b = item->foreground(1);
|
||||
b.setColor(Qt::black);
|
||||
item->setForeground(1,b);
|
||||
item->setForeground(0,b);
|
||||
|
||||
QFont f = item->font(1);
|
||||
f.setBold(true);
|
||||
item->setFont(1,f);
|
||||
item->setFont(0,f);
|
||||
}
|
||||
|
||||
void instDialog::opSuccess(Firewall *fw)
|
||||
{
|
||||
opListMapping[(fw)->getId()]->setText(1,tr("Success"));
|
||||
setSuccessState(opListMapping[(fw)->getId()]);
|
||||
currentLabel->setText("");
|
||||
}
|
||||
|
||||
void instDialog::opError(Firewall *fw)
|
||||
{
|
||||
opListMapping[(fw)->getId()]->setText(1, tr("Error"));
|
||||
setErrorState(opListMapping[(fw)->getId()]);
|
||||
currentLabel->setText("");
|
||||
}
|
||||
|
||||
void instDialog::opCancelled(Firewall *fw)
|
||||
{
|
||||
opListMapping[(fw)->getId()]->setText(1, tr("Cancelled"));
|
||||
setErrorState(opListMapping[(fw)->getId()]);
|
||||
currentLabel->setText("");
|
||||
}
|
||||
|
||||
void instDialog::nextClicked()
|
||||
{
|
||||
if (nextRelevant( currentPage() ) > -1)
|
||||
showPage(nextRelevant( currentPage() ));
|
||||
}
|
||||
|
||||
void instDialog::backClicked()
|
||||
{
|
||||
if (previousRelevant( currentPage() ) > -1)
|
||||
showPage(previousRelevant( currentPage() ));
|
||||
}
|
||||
|
||||
void instDialog::togleDetailMC()
|
||||
{
|
||||
if (m_dialog->detailMCframe->isVisible())
|
||||
{
|
||||
m_dialog->detailsButton->setText(tr("Show details"));
|
||||
m_dialog->detailMCframe->hide();
|
||||
st->setValue(SETTINGS_PATH_PREFIX"/Installer/ShowDetails",false);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_dialog->detailsButton->setText(tr("Hide details"));
|
||||
m_dialog->detailMCframe->show();
|
||||
st->setValue(SETTINGS_PATH_PREFIX"/Installer/ShowDetails",true);
|
||||
}
|
||||
}
|
||||
|
||||
void instDialog::prepareInstConf(Firewall *)
|
||||
{
|
||||
if (fwbdebug) qDebug("instDialog::prepareInstConf");
|
||||
}
|
||||
|
||||
void instDialog::storeInstallerOptions()
|
||||
{
|
||||
st->setValue(SETTINGS_PATH_PREFIX"/Installer/incr", cnf.incremental);
|
||||
st->setValue(SETTINGS_PATH_PREFIX"/Installer/savediff",cnf.save_diff);
|
||||
st->setValue(SETTINGS_PATH_PREFIX"/Installer/saveStandby",cnf.saveStandby);
|
||||
st->setValue(SETTINGS_PATH_PREFIX"/Installer/dryrun" ,cnf.dry_run);
|
||||
st->setValue(SETTINGS_PATH_PREFIX"/Installer/quiet", cnf.quiet);
|
||||
st->setValue(SETTINGS_PATH_PREFIX"/Installer/verbose", cnf.verbose);
|
||||
st->setValue(SETTINGS_PATH_PREFIX"/Installer/stripComments",
|
||||
cnf.stripComments);
|
||||
st->setValue(SETTINGS_PATH_PREFIX"/Installer/compressScript",
|
||||
cnf.compressScript);
|
||||
st->setValue(SETTINGS_PATH_PREFIX"/Installer/copyFWB", cnf.copyFWB);
|
||||
st->setValue(SETTINGS_PATH_PREFIX"/Installer/testRun", cnf.testRun);
|
||||
st->setValue(SETTINGS_PATH_PREFIX"/Installer/rollback", cnf.rollback);
|
||||
st->setValue(SETTINGS_PATH_PREFIX"/Installer/rollbackTime",
|
||||
cnf.rollbackTime);
|
||||
st->setValue(SETTINGS_PATH_PREFIX"/Installer/canceRollbackIfSuccess",
|
||||
cnf.cancelRollbackIfSuccess);
|
||||
}
|
||||
|
||||
void instDialog::summary()
|
||||
{
|
||||
addToLog( "<hr>" + QObject::tr("<b>Summary:</b>\n") );
|
||||
addToLog( QObject::tr("* firewall name : %1\n")
|
||||
.arg(QString::fromUtf8(cnf.fwobj->getName().c_str())) );
|
||||
addToLog( QObject::tr("* user name : %1\n")
|
||||
.arg(cnf.user));
|
||||
addToLog( QObject::tr("* management address : %1\n").arg(cnf.maddr) );
|
||||
addToLog( QObject::tr("* platform : %1\n")
|
||||
.arg(cnf.fwobj->getStr("platform").c_str()) );
|
||||
addToLog( QObject::tr("* host OS : %1\n")
|
||||
.arg(cnf.fwobj->getStr("host_OS").c_str()) );
|
||||
addToLog( QObject::tr("* Loading configuration from file %1\n")
|
||||
.arg(cnf.fwbfile));
|
||||
|
||||
if (cnf.incremental)
|
||||
{
|
||||
addToLog( QObject::tr("* Incremental install\n"));
|
||||
}
|
||||
if (cnf.save_diff && cnf.incremental)
|
||||
{
|
||||
addToLog(
|
||||
QObject::tr("* Configuration diff will be saved in file %1\n").
|
||||
arg(cnf.diff_file));
|
||||
}
|
||||
if (cnf.dry_run)
|
||||
{
|
||||
addToLog(
|
||||
QObject::tr(
|
||||
"* Commands will not be executed on the firewall\n"));
|
||||
}
|
||||
addToLog("<hr>\n");
|
||||
}
|
||||
|
||||
void instDialog::fillCompileSelectList()
|
||||
{
|
||||
if (fwbdebug) qDebug("instDialog::fillCompileSelectList");
|
||||
|
||||
compileMapping.clear();
|
||||
installMapping.clear();
|
||||
|
||||
m_dialog->selectTable->setRowCount(firewalls.size());
|
||||
|
||||
|
||||
QTableWidgetItem * citem;
|
||||
|
||||
Firewall* f;
|
||||
QDateTime dt;
|
||||
int row=0;
|
||||
|
||||
bool show_library=false;
|
||||
string tmp_libname="";
|
||||
|
||||
if (fwbdebug && reqFirewalls.empty())
|
||||
qDebug("instDialog::fillCompileSelectList reqFirewalls is empty");
|
||||
|
||||
creatingTable = true;
|
||||
for (std::list<libfwbuilder::Firewall *>::iterator i=firewalls.begin();
|
||||
i!=firewalls.end(); ++i)
|
||||
{
|
||||
f=*i;
|
||||
|
||||
time_t lm=f->getInt("lastModified");
|
||||
time_t lc=f->getInt("lastCompiled");
|
||||
time_t li=f->getInt("lastInstalled");
|
||||
|
||||
citem = new QTableWidgetItem;
|
||||
citem->setText(QString::fromUtf8(f->getName().c_str()));
|
||||
|
||||
m_dialog->selectTable->setItem(row,2,citem);
|
||||
//m_dialog->selectTable->setColumnReadOnly(2,true);
|
||||
|
||||
// in fact, if someone use same names for several libraries,
|
||||
// additional collumn with library names doesn't help to
|
||||
// identify a firewall
|
||||
if (!show_library && tmp_libname != "" && tmp_libname != f->getLibraryName())
|
||||
show_library = true;
|
||||
tmp_libname = f->getLibraryName();
|
||||
|
||||
citem = new QTableWidgetItem;
|
||||
citem->setText(QString::fromUtf8(tmp_libname.c_str()));
|
||||
m_dialog->selectTable->setItem(row,3,citem);
|
||||
//m_dialog->selectTable->setColumnReadOnly(3,true);
|
||||
|
||||
citem=new QTableWidgetItem; //usual type
|
||||
bool checked = (f->needsCompile() && reqFirewalls.empty() && !f->getInactive()) ||
|
||||
(!reqFirewalls.empty() && reqFirewalls.find(f)!=reqFirewalls.end());
|
||||
citem->setCheckState(checked?Qt::Checked:Qt::Unchecked);
|
||||
m_dialog->selectTable->setItem(row,0,citem);
|
||||
compileMapping[f]=citem;
|
||||
|
||||
citem=new QTableWidgetItem; //usual type
|
||||
checked = (operation==BATCH_INSTALL) &&
|
||||
((f->needsInstall() && reqFirewalls.empty() && !f->getInactive()) ||
|
||||
(!reqFirewalls.empty() && reqFirewalls.find(f)!=reqFirewalls.end()));
|
||||
citem->setCheckState(checked?Qt::Checked:Qt::Unchecked);
|
||||
m_dialog->selectTable->setItem(row,1,citem);
|
||||
installMapping[f]=citem;
|
||||
|
||||
dt.setTime_t(lm);
|
||||
citem = new QTableWidgetItem;
|
||||
citem->setText((lm)?dt.toString():QString("---"));
|
||||
m_dialog->selectTable->setItem(row,4,citem);
|
||||
|
||||
dt.setTime_t(lc);
|
||||
citem = new QTableWidgetItem;
|
||||
citem->setText((lm)?dt.toString():QString("---"));
|
||||
m_dialog->selectTable->setItem(row,5,citem);
|
||||
|
||||
dt.setTime_t(li);
|
||||
citem = new QTableWidgetItem;
|
||||
citem->setText((lm)?dt.toString():QString("---"));
|
||||
m_dialog->selectTable->setItem(row,6,citem);
|
||||
|
||||
row++;
|
||||
}
|
||||
|
||||
creatingTable = false;
|
||||
|
||||
if (show_library) m_dialog->selectTable->showColumn(3);
|
||||
else m_dialog->selectTable->hideColumn(3);
|
||||
|
||||
for (int i=0;i<m_dialog->selectTable->columnCount();i++)
|
||||
{
|
||||
if (i<4)
|
||||
m_dialog->selectTable->resizeColumnToContents(i);
|
||||
else
|
||||
m_dialog->selectTable->setColumnWidth(i,200);
|
||||
}
|
||||
|
||||
//selectTable->setColumnStretchable(2,true);
|
||||
//selectTable->sortColumn(2,true,true);
|
||||
m_dialog->selectTable->resizeRowsToContents();
|
||||
}
|
||||
|
||||
void instDialog::displayCommand(const QStringList &args)
|
||||
{
|
||||
QStringList a1 = args;
|
||||
|
||||
for (QStringList::iterator i=a1.begin(); i!=a1.end(); i++)
|
||||
{
|
||||
if ( (*i)=="-pw" )
|
||||
{
|
||||
i++;
|
||||
*i = "XXXXXX";
|
||||
break;
|
||||
}
|
||||
}
|
||||
QString s=a1.join(" ");
|
||||
addToLog( tr("Running command '%1'\n").arg(s) );
|
||||
}
|
||||
|
||||
void instDialog::updateProgressBar(int n, bool setsize)
|
||||
{
|
||||
if (fwbdebug)
|
||||
qDebug("instDialog::updateProgressBar n=%d setsize=%d",n,setsize);
|
||||
|
||||
if (setsize) currentProgressBar->setMaximum(n);
|
||||
else
|
||||
currentProgressBar->setValue(currentProgressBar->maximum()-n);
|
||||
}
|
||||
|
||||
void instDialog::finishClicked()
|
||||
{
|
||||
accept();
|
||||
}
|
||||
|
||||
/* user clicked 'Cancel' */
|
||||
void instDialog::cancelClicked()
|
||||
{
|
||||
if (fwbdebug) qDebug("instDialog::cancelClicked()");
|
||||
|
||||
if (proc.state() == QProcess::Running)
|
||||
{
|
||||
rejectDialogFlag = true;
|
||||
proc.kill();
|
||||
}
|
||||
else
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
|
||||
void instDialog::showEvent( QShowEvent *ev)
|
||||
{
|
||||
st->restoreGeometry(this, QRect(200,100,480,500) );
|
||||
QDialog::showEvent(ev);
|
||||
}
|
||||
|
||||
void instDialog::hideEvent( QHideEvent *ev)
|
||||
{
|
||||
st->saveGeometry(this);
|
||||
QDialog::hideEvent(ev);
|
||||
}
|
||||
|
||||
void instDialog::saveLog()
|
||||
{
|
||||
QString dir;
|
||||
if (currentLog==NULL) return;
|
||||
dir=st->getWDir();
|
||||
if (dir.isEmpty()) dir=st->getOpenFileDir();
|
||||
if (dir.isEmpty()) dir="~";
|
||||
|
||||
/*
|
||||
* We use QTextEdit::append to add lines to the log buffer, each
|
||||
append creates a new paragraph so QTextEdit::text returns only
|
||||
contents of the last paragraph. Need to reassemble the whole text
|
||||
adding text from each paragraph separately.
|
||||
*/
|
||||
QString logText;
|
||||
logText = currentLog->toPlainText();
|
||||
//logText = currentLog->toHtml();
|
||||
|
||||
QString s = QFileDialog::getSaveFileName(
|
||||
this,
|
||||
"Choose a file",
|
||||
dir,
|
||||
"Text file (*.txt)");
|
||||
|
||||
if (fwbdebug)
|
||||
qDebug( "Saving log to file %s", s.toAscii().constData() );
|
||||
|
||||
if (!s.isEmpty())
|
||||
{
|
||||
if (!s.endsWith(".txt"))
|
||||
{
|
||||
s+=".txt";
|
||||
}
|
||||
|
||||
QFile f(s);
|
||||
if (f.open( QIODevice::WriteOnly ))
|
||||
{
|
||||
QTextStream str( &f );
|
||||
str << logText;
|
||||
f.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Adds one line of text to the log
|
||||
*
|
||||
*/
|
||||
void instDialog::addToLog(const QString &line)
|
||||
{
|
||||
if (fwbdebug) qDebug("instDialog::addToLog");
|
||||
if (line.isEmpty()) return;
|
||||
|
||||
if (currentLog)
|
||||
{
|
||||
QString txt = line;
|
||||
txt.replace(QRegExp("(Error(:| )[^\n]*)\n"),
|
||||
QString("<b><font color=\"red\">\\1</font></b>\n"));
|
||||
txt.replace(QRegExp("(Abnormal[^\n]*)\n"),
|
||||
QString("<b><font color=\"red\">\\1</font></b>\n"));
|
||||
|
||||
// the following regex matches assertion errors
|
||||
txt.replace(QRegExp("(fwb_[a-z]{1,}: \\S*\\.cpp:\\d{1,}: .*: Assertion .* failed.)"),
|
||||
QString("<b><font color=\"red\">\\1</font></b>\n"));
|
||||
|
||||
txt.replace('\n', "<br>\n");
|
||||
currentLog->insertHtml( txt );
|
||||
currentLog->ensureCursorVisible();
|
||||
}
|
||||
}
|
||||
|
||||
void instDialog::interpretLogLine(const QString &line)
|
||||
{
|
||||
if (fwbdebug)
|
||||
qDebug("instDialog::interpretLogLine %s", line.toAscii().constData() );
|
||||
|
||||
QStringList words = line.trimmed().split(" ");
|
||||
|
||||
if (fwbdebug)
|
||||
{
|
||||
for (int i=0; i<words.size(); ++i)
|
||||
qDebug("instDialog::interpretLogLine words[%d]='%s'",
|
||||
i, words[i].toAscii().constData());
|
||||
}
|
||||
|
||||
if (words.first().indexOf("rule")>=0)
|
||||
{
|
||||
bool ok;
|
||||
processedRules = words[1].toInt(&ok);
|
||||
if (ok)
|
||||
currentProgressBar->setValue(processedRules);
|
||||
|
||||
if (fwbdebug)
|
||||
qDebug("instDialog::interpretLogLine set progress bar current=%d",
|
||||
processedRules);
|
||||
} else
|
||||
{
|
||||
if (words.first().indexOf("processing")>=0)
|
||||
{
|
||||
currentProgressBar->reset();
|
||||
bool ok;
|
||||
int totalRules = words[1].toInt(&ok);
|
||||
if (ok)
|
||||
currentProgressBar->setMaximum(totalRules);
|
||||
processedRules = 0;
|
||||
|
||||
if (fwbdebug)
|
||||
qDebug("instDialog::interpretLogLine set progress bar max=%d",
|
||||
totalRules);
|
||||
} else
|
||||
{
|
||||
if (words.first().indexOf("Compiling")>=0)
|
||||
{
|
||||
//currentLabel->setText(line.trimmed());
|
||||
currentProgressBar->reset();
|
||||
} else
|
||||
{
|
||||
if (line.indexOf("Compiled successfully")>=0)
|
||||
{
|
||||
//currentLabel->setText(line.trimmed());
|
||||
currentProgressBar->setValue(currentProgressBar->maximum());
|
||||
if (fwbdebug)
|
||||
qDebug("instDialog::interpretLogLine set progress "
|
||||
"bar to max");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
QApplication::processEvents(QEventLoop::ExcludeUserInputEvents,1);
|
||||
}
|
||||
|
||||
void instDialog::readFromStdout()
|
||||
{
|
||||
char buf[2048];
|
||||
int read_status = 0;
|
||||
while ((read_status = proc.readLine(buf, sizeof(buf)))>0)
|
||||
{
|
||||
if (fwbdebug)
|
||||
{
|
||||
qDebug("instDialog::readFromStdout: read_status=%d buf=%s",
|
||||
read_status, buf);
|
||||
}
|
||||
addToLog(buf);
|
||||
interpretLogLine(buf);
|
||||
}
|
||||
}
|
||||
|
||||
void instDialog::selectAllFirewalls()
|
||||
{
|
||||
if (fwbdebug) qDebug("instDialog::selectAllFirewalls");
|
||||
if (operation==BATCH_INSTALL)selectAll(installMapping);
|
||||
selectAll(compileMapping);
|
||||
tableValueChanged(0,0);
|
||||
}
|
||||
|
||||
|
||||
void instDialog::deselectAllFirewalls()
|
||||
{
|
||||
if (operation==BATCH_INSTALL)deselectAll(installMapping);
|
||||
deselectAll(compileMapping);
|
||||
tableValueChanged(0,0);
|
||||
}
|
||||
|
||||
void instDialog::selectAll(t_tableMap &mapping)
|
||||
{
|
||||
if (fwbdebug) qDebug("instDialog::selectAll");
|
||||
|
||||
t_tableMap::iterator i;
|
||||
|
||||
QTableWidgetItem *item;
|
||||
|
||||
for(i=mapping.begin();i!=mapping.end();++i)
|
||||
{
|
||||
item=(*i).second;
|
||||
item->setCheckState(Qt::Checked);
|
||||
}
|
||||
}
|
||||
void instDialog::deselectAll(t_tableMap &mapping)
|
||||
{
|
||||
if (fwbdebug) qDebug("instDialog::deselectAll");
|
||||
t_tableMap::iterator i;
|
||||
QTableWidgetItem *item;
|
||||
for(i=mapping.begin();i!=mapping.end();++i)
|
||||
{
|
||||
item=(*i).second;
|
||||
item->setCheckState(Qt::Unchecked);
|
||||
}
|
||||
}
|
||||
|
||||
void instDialog::fillCompileOpList()
|
||||
{
|
||||
compile_fw_list.clear();
|
||||
t_fwList::iterator i;
|
||||
for(i=firewalls.begin(); i!=firewalls.end(); ++i)
|
||||
{
|
||||
if(compileMapping[*i]->checkState() == Qt::Checked)
|
||||
compile_fw_list.push_back(*i);
|
||||
}
|
||||
compile_list_initial_size = compile_fw_list.size();
|
||||
}
|
||||
|
||||
void instDialog::fillCompileUIList()
|
||||
{
|
||||
m_dialog->fwWorkList->clear();
|
||||
opListMapping.clear();
|
||||
|
||||
Firewall * f;
|
||||
InstallFirewallViewItem * item;
|
||||
list<Firewall*>::iterator i;
|
||||
for(i=compile_fw_list.begin(); i!=compile_fw_list.end(); ++i)
|
||||
{
|
||||
f=(*i);
|
||||
item = new InstallFirewallViewItem(
|
||||
NULL,//m_dialog->fwWorkList,
|
||||
QString::fromUtf8(f->getName().c_str()),
|
||||
false);
|
||||
|
||||
m_dialog->fwWorkList->insertTopLevelItem(0, item);
|
||||
|
||||
opListMapping[f->getId()] = item;
|
||||
}
|
||||
|
||||
m_dialog->fwWorkList->resizeColumnToContents(0);
|
||||
m_dialog->fwWorkList->sortByColumn(0, Qt::AscendingOrder);
|
||||
}
|
||||
|
||||
void instDialog::fillInstallOpList()
|
||||
{
|
||||
if (fwbdebug) qDebug("instDialog::fillInstallOpList");
|
||||
install_fw_list.clear();
|
||||
t_fwList::iterator i;
|
||||
for(i=firewalls.begin(); i!=firewalls.end(); ++i)
|
||||
{
|
||||
if (installMapping[*i]->checkState() == Qt::Checked)
|
||||
install_fw_list.push_back(*i);
|
||||
}
|
||||
install_list_initial_size = install_fw_list.size();
|
||||
}
|
||||
|
||||
void instDialog::fillInstallUIList()
|
||||
{
|
||||
if (fwbdebug) qDebug("instDialog::fillInstallUIList");
|
||||
m_dialog->fwWorkList->clear();
|
||||
opListMapping.clear();
|
||||
|
||||
Firewall * f;
|
||||
InstallFirewallViewItem * item;
|
||||
list<Firewall*>::iterator i;
|
||||
for(i=install_fw_list.begin(); i!=install_fw_list.end(); ++i)
|
||||
{
|
||||
f=(*i);
|
||||
item = new InstallFirewallViewItem(
|
||||
NULL,
|
||||
QString::fromUtf8(f->getName().c_str()),
|
||||
false);
|
||||
|
||||
m_dialog->fwWorkList->insertTopLevelItem(0, item);
|
||||
opListMapping[f->getId()] = item;
|
||||
}
|
||||
m_dialog->fwWorkList->resizeColumnToContents(0);
|
||||
m_dialog->fwWorkList->sortByColumn(0, Qt::AscendingOrder);
|
||||
}
|
||||
|
||||
void instDialog::findFirewallInCompileLog(QTreeWidgetItem* item)
|
||||
{
|
||||
if (fwbdebug) qDebug("instDialog::findFirewallInCompileLog");
|
||||
Firewall *fw;
|
||||
//int p=1,i=0;
|
||||
|
||||
m_dialog->detailMCframe->show();
|
||||
qApp->processEvents();
|
||||
fw=findFirewallbyListItem(item);
|
||||
m_dialog->procLogDisplay->moveCursor( QTextCursor::End );
|
||||
m_dialog->procLogDisplay->find(currentSearchString +
|
||||
QString::fromUtf8(fw->getName().c_str()),
|
||||
QTextDocument::FindWholeWords |
|
||||
QTextDocument::FindCaseSensitively |
|
||||
QTextDocument::FindBackward);
|
||||
}
|
||||
|
||||
Firewall * instDialog::findFirewallbyListItem(QTreeWidgetItem *item)
|
||||
{
|
||||
Firewall * res=NULL;
|
||||
std::map<int,QTreeWidgetItem*>::iterator i;
|
||||
|
||||
for(i=opListMapping.begin(); i!=opListMapping.end(); ++i)
|
||||
{
|
||||
if ((*i).second==item)
|
||||
{
|
||||
int id = (*i).first;
|
||||
res = Firewall::cast(mw->db()->findInIndex(id));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
Firewall * instDialog::findFirewallbyTableItem(QTableWidgetItem *item)
|
||||
{
|
||||
Firewall * res=NULL;
|
||||
t_tableMap::iterator i;
|
||||
|
||||
for(i=compileMapping.begin();i!=compileMapping.end();++i)
|
||||
{
|
||||
if ((*i).second==item)
|
||||
{
|
||||
res=(*i).first;
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
for(i=installMapping.begin();i!=installMapping.end();++i)
|
||||
{
|
||||
if ((*i).second==item)
|
||||
{
|
||||
res=(*i).first;
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
void instDialog::showSelected()
|
||||
{
|
||||
QTableWidgetItem* item;
|
||||
Firewall *f;
|
||||
|
||||
t_fwList::iterator i;
|
||||
bool sel;
|
||||
|
||||
for(i=firewalls.begin();i!=firewalls.end();++i)
|
||||
{
|
||||
sel=false;
|
||||
|
||||
f=(*i);
|
||||
item=compileMapping[f];
|
||||
sel|=item->checkState()==Qt::Checked;
|
||||
|
||||
item=installMapping[f];
|
||||
sel|=item->checkState()==Qt::Checked;
|
||||
|
||||
if(!sel )
|
||||
{
|
||||
if (showSelectedFlag)
|
||||
{
|
||||
m_dialog->selectTable->showRow(item->row());
|
||||
}
|
||||
else
|
||||
{
|
||||
m_dialog->selectTable->hideRow(item->row());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (showSelectedFlag)
|
||||
{
|
||||
m_dialog->showSelButton->setText(tr("Show selected"));
|
||||
m_dialog->pushButton16->setEnabled(true);
|
||||
m_dialog->pushButton17->setEnabled(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_dialog->showSelButton->setText(tr("Show all"));
|
||||
m_dialog->pushButton16->setEnabled(false);
|
||||
m_dialog->pushButton17->setEnabled(false);
|
||||
}
|
||||
showSelectedFlag = !showSelectedFlag;
|
||||
}
|
||||
|
||||
void instDialog::tableValueChanged(int row, int col)
|
||||
{
|
||||
if (creatingTable) return;
|
||||
if (fwbdebug) qDebug("instDialog::tableValueChanged");
|
||||
QTableWidgetItem *item;
|
||||
Firewall *f;
|
||||
|
||||
item = m_dialog->selectTable->item(row,col);
|
||||
f = findFirewallbyTableItem(item);
|
||||
|
||||
if (col==0)
|
||||
{ // Compilation flag has been changed
|
||||
if (
|
||||
(item->checkState()==Qt::Unchecked) &&
|
||||
f->getInt("lastCompiled")==0 &&
|
||||
(installMapping[f]->checkState()==Qt::Checked))
|
||||
{
|
||||
installMapping[f]->setCheckState(Qt::Unchecked);
|
||||
}
|
||||
}
|
||||
else if (col==1)
|
||||
{ // Installation flag has been changed
|
||||
if (
|
||||
(item->checkState()==Qt::Checked) &&
|
||||
f->getInt("lastCompiled")==0)
|
||||
{
|
||||
compileMapping[f]->setCheckState(Qt::Checked);
|
||||
}
|
||||
}
|
||||
|
||||
setNextEnabled(0, tableHasChecked());
|
||||
}
|
||||
|
||||
bool instDialog::tableHasChecked()
|
||||
{
|
||||
QTableWidgetItem *item;
|
||||
Firewall *f;
|
||||
|
||||
t_fwList::iterator i;
|
||||
|
||||
bool res=false;
|
||||
|
||||
for(i=firewalls.begin();i!=firewalls.end();++i)
|
||||
{
|
||||
f=(*i);
|
||||
item=compileMapping[f];
|
||||
if(!item) return false;
|
||||
if(item->checkState()==Qt::Checked) res = true;
|
||||
|
||||
item=installMapping[f];
|
||||
if(!item) return false;
|
||||
if(item->checkState()==Qt::Checked) res = true;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
void instDialog::clearReqFirewalls()
|
||||
{
|
||||
reqFirewalls.clear();
|
||||
}
|
||||
|
||||
void instDialog::addReqFirewall(Firewall *f)
|
||||
{
|
||||
reqFirewalls.insert(f);
|
||||
}
|
||||
|
||||
/*
|
||||
* getInstOptions() fills attributes of the cnf object
|
||||
*/
|
||||
bool instDialog::getInstOptions(Firewall *fw)
|
||||
{
|
||||
cnf.fwobj = fw;
|
||||
|
||||
readInstallerOptionsFromSettings();
|
||||
readInstallerOptionsFromFirewallObject(fw);
|
||||
|
||||
if (!m_dialog->batchInstall->isChecked())
|
||||
{
|
||||
instOptionsDialog *inst_opt_dlg = new instOptionsDialog(this, &cnf);
|
||||
if (inst_opt_dlg->exec()==QDialog::Rejected)
|
||||
{
|
||||
delete inst_opt_dlg;
|
||||
return false;
|
||||
}
|
||||
readInstallerOptionsFromDialog(fw, inst_opt_dlg);
|
||||
}
|
||||
|
||||
completeInstallerOptions();
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* getBatchInstOptions() fills attributes of the cnf object for batch install
|
||||
*/
|
||||
bool instDialog::getBatchInstOptions()
|
||||
{
|
||||
cnf.fwobj = NULL;
|
||||
|
||||
readInstallerOptionsFromSettings();
|
||||
|
||||
instBatchOptionsDialog *inst_opt_dlg = new instBatchOptionsDialog(this,
|
||||
&cnf);
|
||||
if (inst_opt_dlg->exec()==QDialog::Rejected)
|
||||
{
|
||||
delete inst_opt_dlg;
|
||||
stopProcessFlag = true;
|
||||
showPage(0);
|
||||
return false;
|
||||
}
|
||||
// clear aternative address in the dialog
|
||||
inst_opt_dlg->m_dialog->altAddress->setText("");
|
||||
readInstallerOptionsFromDialog(NULL, inst_opt_dlg);
|
||||
completeInstallerOptions();
|
||||
return true;
|
||||
}
|
||||
|
||||
void instDialog::readInstallerOptionsFromSettings()
|
||||
{
|
||||
if (fwbdebug) qDebug("instDialog::readInstallerOptionsFromSettings");
|
||||
|
||||
fwb_prompt="--**--**--";
|
||||
|
||||
cnf.batchInstall = m_dialog->batchInstall->isChecked();
|
||||
|
||||
cnf.incremental= st->value(SETTINGS_PATH_PREFIX"/Installer/incr").toBool();
|
||||
cnf.save_diff = st->value(SETTINGS_PATH_PREFIX"/Installer/savediff").toBool();
|
||||
cnf.saveStandby = st->value(SETTINGS_PATH_PREFIX"/Installer/saveStandby").toBool();
|
||||
cnf.dry_run = st->value(SETTINGS_PATH_PREFIX"/Installer/dryrun").toBool();
|
||||
cnf.quiet = st->value(SETTINGS_PATH_PREFIX"/Installer/quiet").toBool();
|
||||
cnf.verbose = st->value(SETTINGS_PATH_PREFIX"/Installer/verbose" ).toBool();
|
||||
cnf.stripComments = st->value(SETTINGS_PATH_PREFIX"/Installer/stripComments").toBool();
|
||||
cnf.compressScript = st->value(SETTINGS_PATH_PREFIX"/Installer/compressScript").toBool();
|
||||
cnf.copyFWB = st->value(SETTINGS_PATH_PREFIX"/Installer/copyFWB").toBool();
|
||||
cnf.testRun = st->value(SETTINGS_PATH_PREFIX"/Installer/testRun").toBool();
|
||||
cnf.rollback = st->value(SETTINGS_PATH_PREFIX"/Installer/rollback").toBool();
|
||||
cnf.rollbackTime = st->value(SETTINGS_PATH_PREFIX"/Installer/rollbackTime").toInt();
|
||||
cnf.cancelRollbackIfSuccess =
|
||||
st->value(SETTINGS_PATH_PREFIX"/Installer/canceRollbackIfSuccess").toBool();
|
||||
}
|
||||
|
||||
void instDialog::readInstallerOptionsFromFirewallObject(Firewall *fw)
|
||||
{
|
||||
FWOptions *fwopt = NULL;
|
||||
if (fw)
|
||||
{
|
||||
fwopt = fw->getOptionsObject();
|
||||
cnf.user = fwopt->getStr("admUser").c_str();
|
||||
QString aaddr = fwopt->getStr("altAddress").c_str();
|
||||
if (!aaddr.isEmpty()) cnf.maddr = aaddr;
|
||||
else
|
||||
{
|
||||
const InetAddr *mgmt_addr = cnf.fwobj->getManagementAddress();
|
||||
if (mgmt_addr)
|
||||
cnf.maddr = mgmt_addr->toString().c_str();
|
||||
else
|
||||
cnf.maddr = "";
|
||||
}
|
||||
if (fwbdebug) qDebug("management address: %s",
|
||||
cnf.maddr.toAscii().constData());
|
||||
/*
|
||||
* if user requested test run, store firewall script in a temp
|
||||
* file. Always store it in a temp file on linksys
|
||||
*/
|
||||
QString s;
|
||||
|
||||
/* user_can_change_install_dir */
|
||||
bool uccid = Resources::getTargetOptionBool(
|
||||
cnf.fwobj->getStr("host_OS"),"user_can_change_install_dir");
|
||||
|
||||
if (uccid) s = fwopt->getStr("firewall_dir").c_str();
|
||||
|
||||
if (s.isEmpty()) s = Resources::getTargetOptionStr(
|
||||
cnf.fwobj->getStr("host_OS"), "activation/fwdir").c_str();
|
||||
|
||||
cnf.fwdir = s;
|
||||
|
||||
QString ofname = fwopt->getStr("output_file").c_str();
|
||||
if (ofname.isEmpty())
|
||||
ofname = QString(cnf.fwobj->getName().c_str()) + ".fw";
|
||||
cnf.conffile = FirewallInstaller::getGeneratedFileFullPath(fw);
|
||||
cnf.fwbfile = mw->db()->getFileName().c_str();
|
||||
cnf.wdir = getFileDir( mw->getRCS()->getFileName() );
|
||||
cnf.diff_file = QString(cnf.fwobj->getName().c_str())+".diff";
|
||||
cnf.diff_pgm = Resources::platform_res[cnf.fwobj->getStr("platform")]->
|
||||
getResourceStr("/FWBuilderResources/Target/diff").c_str();
|
||||
cnf.diff_pgm = getPathToBinary(
|
||||
cnf.diff_pgm.toAscii().constData()).c_str();
|
||||
#ifdef _WIN32
|
||||
cnf.diff_pgm = cnf.diff_pgm + ".exe";
|
||||
#endif
|
||||
cnf.sshArgs = fwopt->getStr("sshArgs").c_str();
|
||||
cnf.scpArgs = fwopt->getStr("scpArgs").c_str();
|
||||
cnf.activationCmd = fwopt->getStr("activationCmd").c_str();
|
||||
|
||||
cnf.rollbackTimeUnit =
|
||||
Resources::getTargetOptionStr(cnf.fwobj->getStr("host_OS"),
|
||||
"activation/timeout_units").c_str();
|
||||
}
|
||||
}
|
||||
|
||||
void instDialog::readInstallerOptionsFromDialog(Firewall *fw,
|
||||
instOptionsDialog *dlg)
|
||||
{
|
||||
if (fwbdebug) qDebug("instDialog::readInstallerOptionsFromDialog");
|
||||
|
||||
cnf.fwobj = fw;
|
||||
FWOptions *fwopt = NULL;
|
||||
if (fw) fwopt = cnf.fwobj->getOptionsObject();
|
||||
|
||||
cnf.incremental = dlg->m_dialog->incr->isChecked();
|
||||
cnf.dry_run = dlg->m_dialog->test->isChecked();
|
||||
cnf.backup_file = dlg->m_dialog->backupConfigFile->text();
|
||||
cnf.backup = !cnf.backup_file.isEmpty();
|
||||
cnf.save_diff = dlg->m_dialog->saveDiff->isChecked();
|
||||
cnf.saveStandby = dlg->m_dialog->saveStandby->isChecked();
|
||||
|
||||
/* Alternative address:
|
||||
- first, check dialog. User could have overriden it using dialog
|
||||
- then check firewall options, user could have set it in the "Install"
|
||||
tab of firewall settings dialog
|
||||
- last, if all overrides are empty, take it from the management interface
|
||||
*/
|
||||
|
||||
QString aaddr = dlg->m_dialog->altAddress->text();
|
||||
if (!aaddr.isEmpty())
|
||||
{
|
||||
/* alternative address can also be putty session name. In any case,
|
||||
* leave it up to ssh to resolve it and signal an error if it can't be
|
||||
* resolved ( Putty session name does not have to be in DNS at all ).
|
||||
*/
|
||||
cnf.maddr = aaddr;
|
||||
if (fwbdebug)
|
||||
qDebug("alternative addr %s", aaddr.toAscii().constData());
|
||||
}
|
||||
|
||||
cnf.user = dlg->m_dialog->uname->text();
|
||||
cnf.pwd = dlg->m_dialog->pwd->text();
|
||||
cnf.epwd = dlg->m_dialog->epwd->text();
|
||||
cnf.quiet = dlg->m_dialog->quiet->isChecked();
|
||||
cnf.verbose = dlg->m_dialog->verbose->isChecked();
|
||||
cnf.stripComments = dlg->m_dialog->stripComments->isChecked();
|
||||
cnf.compressScript= dlg->m_dialog->compressScript->isChecked();
|
||||
cnf.copyFWB = dlg->m_dialog->copyFWB->isChecked();
|
||||
cnf.testRun = dlg->m_dialog->testRun->isChecked();
|
||||
cnf.rollback = dlg->m_dialog->rollback->isChecked();
|
||||
cnf.rollbackTime = dlg->m_dialog->rollbackTime->value();
|
||||
cnf.cancelRollbackIfSuccess =
|
||||
dlg->m_dialog->cancelRollbackIfSuccess->isChecked();
|
||||
|
||||
storeInstallerOptions();
|
||||
}
|
||||
|
||||
void instDialog::completeInstallerOptions()
|
||||
{
|
||||
/* check for a common error when multiple interfaces are marked as
|
||||
* 'management'
|
||||
*/
|
||||
if (cnf.fwobj)
|
||||
{
|
||||
int nmi = 0;
|
||||
list<FWObject*> ll = cnf.fwobj->getByType(Interface::TYPENAME);
|
||||
for (FWObject::iterator i=ll.begin(); i!=ll.end(); i++)
|
||||
{
|
||||
Interface *intf = Interface::cast( *i );
|
||||
if (intf->isManagement()) nmi++;
|
||||
}
|
||||
if (nmi>1)
|
||||
{
|
||||
addToLog(
|
||||
QObject::tr("Only one interface of the firewall '%1' "
|
||||
"must be marked as management interface.\n")
|
||||
.arg(QString::fromUtf8(cnf.fwobj->getName().c_str())) );
|
||||
return;
|
||||
}
|
||||
if (nmi==0)
|
||||
{
|
||||
addToLog(
|
||||
QObject::tr("One of the interfaces of the firewall '%1' "
|
||||
"must be marked as management interface.\n")
|
||||
.arg(QString::fromUtf8(cnf.fwobj->getName().c_str())));
|
||||
return;
|
||||
}
|
||||
if (cnf.maddr == "" ||
|
||||
cnf.maddr == QString(InetAddr::getAny().toString().c_str()))
|
||||
{
|
||||
addToLog(
|
||||
QObject::tr("Management interface does not have IP address, "
|
||||
"can not communicate with the firewall.\n") );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -55,20 +55,9 @@ instOptionsDialog::instOptionsDialog(QWidget *parent, instConf *_cnf) :
|
||||
m_dialog->setupUi(this);
|
||||
cnf = _cnf;
|
||||
|
||||
QString platform = cnf->fwobj->getStr("platform").c_str();
|
||||
|
||||
m_dialog->pwd->setEchoMode( QLineEdit::Password );
|
||||
m_dialog->epwd->setEchoMode( QLineEdit::Password );
|
||||
|
||||
QString fwname = QString::fromUtf8(cnf->fwobj->getName().c_str());
|
||||
if (!cnf->batchInstall)
|
||||
m_dialog->dialogTitleLine->setText(
|
||||
QString("<p align=\"center\"><b><font size=\"+2\">")+
|
||||
tr("Install options for firewall '%1'").arg(fwname)+
|
||||
QString("</font></b></p>")
|
||||
);
|
||||
|
||||
m_dialog->uname->setFocus();
|
||||
m_dialog->uname->setText( cnf->user );
|
||||
m_dialog->incr->setChecked( cnf->incremental );
|
||||
m_dialog->test->setChecked( cnf->dry_run );
|
||||
@ -86,71 +75,67 @@ instOptionsDialog::instOptionsDialog(QWidget *parent, instConf *_cnf) :
|
||||
m_dialog->rollbackTime->setValue( cnf->rollbackTime );
|
||||
m_dialog->cancelRollbackIfSuccess->setChecked( cnf->cancelRollbackIfSuccess );
|
||||
|
||||
if (platform=="pix" || platform=="fwsm" || platform=="iosacl")
|
||||
// If we have user name, bring focus to the password input field
|
||||
// if we do not have user name, focus goes to the user name field
|
||||
if (cnf->user.isEmpty()) m_dialog->uname->setFocus();
|
||||
else m_dialog->pwd->setFocus();
|
||||
|
||||
|
||||
if (cnf->batchInstall)
|
||||
{
|
||||
m_dialog->copyFWB->hide();
|
||||
|
||||
// Hide elements of installOptions dialog for which we do not have commands
|
||||
QString cmd = cnf->getCmdFromResource("schedule_rollback");
|
||||
// option "schedule_rollback" is currently used to control rollback
|
||||
// behavior only for pix, fwsm and ios
|
||||
if (cmd.isEmpty())
|
||||
{
|
||||
m_dialog->rollback->hide();
|
||||
m_dialog->rollbackTime->hide();
|
||||
m_dialog->rollbackTimeUnit->hide();
|
||||
m_dialog->cancelRollbackIfSuccess->hide();
|
||||
}
|
||||
|
||||
if (platform=="iosacl")
|
||||
{
|
||||
m_dialog->PIXgroupBox->hide();
|
||||
/*
|
||||
incr->hide();
|
||||
test->hide();
|
||||
saveStandby->hide();
|
||||
backupConfigFile->hide();
|
||||
backupConfigFileLbl->hide();
|
||||
*/
|
||||
}
|
||||
|
||||
if (cnf->batchInstall)
|
||||
{
|
||||
m_dialog->backupConfigFile->hide();
|
||||
m_dialog->backupConfigFileLbl->hide();
|
||||
}
|
||||
|
||||
m_dialog->rollback->hide();
|
||||
m_dialog->rollbackTime->hide();
|
||||
m_dialog->rollbackTimeUnit->hide();
|
||||
m_dialog->cancelRollbackIfSuccess->hide();
|
||||
m_dialog->PIXgroupBox->hide();
|
||||
m_dialog->backupConfigFile->hide();
|
||||
m_dialog->backupConfigFileLbl->hide();
|
||||
} else
|
||||
{
|
||||
m_dialog->epwd->hide();
|
||||
m_dialog->PIXgroupBox->hide();
|
||||
// cancelling rollback at the end of activation is currently
|
||||
// only supported on pix,fwsm and ios
|
||||
m_dialog->cancelRollbackIfSuccess->hide();
|
||||
QString fwname = QString::fromUtf8(cnf->fwobj->getName().c_str());
|
||||
m_dialog->dialogTitleLine->setText(
|
||||
QString("<p align=\"center\"><b><font size=\"+2\">")+
|
||||
tr("Install options for firewall '%1'").arg(fwname)+
|
||||
QString("</font></b></p>")
|
||||
);
|
||||
|
||||
QString platform = cnf->fwobj->getStr("platform").c_str();
|
||||
|
||||
if (platform=="pix" || platform=="fwsm" || platform=="iosacl")
|
||||
{
|
||||
m_dialog->copyFWB->hide();
|
||||
// Hide elements of installOptions dialog for which we do not
|
||||
// have commands
|
||||
QString cmd = cnf->getCmdFromResource("schedule_rollback");
|
||||
// option "schedule_rollback" is currently used to control rollback
|
||||
// behavior only for pix, fwsm and ios
|
||||
if (cmd.isEmpty())
|
||||
{
|
||||
m_dialog->rollback->hide();
|
||||
m_dialog->rollbackTime->hide();
|
||||
m_dialog->rollbackTimeUnit->hide();
|
||||
m_dialog->cancelRollbackIfSuccess->hide();
|
||||
}
|
||||
|
||||
if (platform=="iosacl") m_dialog->PIXgroupBox->hide();
|
||||
|
||||
} else
|
||||
{
|
||||
m_dialog->epwd->hide();
|
||||
m_dialog->PIXgroupBox->hide();
|
||||
// cancelling rollback at the end of activation is currently
|
||||
// only supported on pix,fwsm and ios
|
||||
m_dialog->cancelRollbackIfSuccess->hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* hide anyway, diff does not work for pix 6.3(3) */
|
||||
//dlg->hideOption( dlg->saveDiff );
|
||||
m_dialog->saveDiff->hide();
|
||||
|
||||
//progressBar->hide();
|
||||
//dlg->hideOption( dlg->stripComments );
|
||||
m_dialog->stripComments->hide();
|
||||
//dlg->compressScript->hide();
|
||||
|
||||
//if (platform=="pix" || platform=="fwsm")
|
||||
//{
|
||||
// progressBar->show();
|
||||
// stripComments->show();
|
||||
//}
|
||||
|
||||
if (cnf->fwobj->getStr("host_OS")!="linksys")
|
||||
{
|
||||
m_dialog->compressScript->hide();
|
||||
//dlg->hideOption( dlg->compressScript );
|
||||
}
|
||||
m_dialog->compressScript->hide();
|
||||
|
||||
m_dialog->PIXgroupBox->adjustSize();
|
||||
m_dialog->generalOptionsBox->adjustSize();
|
||||
|
@ -6,7 +6,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>780</width>
|
||||
<height>533</height>
|
||||
<height>577</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
@ -19,12 +19,6 @@
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="titleLabel" >
|
||||
<property name="sizePolicy" >
|
||||
@ -65,7 +59,7 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="currentIndex" >
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page" >
|
||||
<property name="sizePolicy" >
|
||||
@ -81,14 +75,8 @@
|
||||
<property name="margin" >
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin" >
|
||||
<number>2</number>
|
||||
</property>
|
||||
@ -107,9 +95,6 @@
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
@ -144,9 +129,6 @@
|
||||
<property name="margin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QCheckBox" name="batchInstall" >
|
||||
<property name="sizePolicy" >
|
||||
@ -191,9 +173,6 @@
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
@ -260,9 +239,6 @@
|
||||
<property name="margin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QPushButton" name="pushButton16" >
|
||||
<property name="text" >
|
||||
@ -312,12 +288,6 @@
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_2" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame18_2" >
|
||||
<property name="frameShape" >
|
||||
@ -330,9 +300,6 @@
|
||||
<property name="margin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QPushButton" name="controlMCButton" >
|
||||
<property name="text" >
|
||||
@ -391,20 +358,11 @@
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="textLabel1" >
|
||||
<property name="text" >
|
||||
@ -448,22 +406,6 @@
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="ProcLabel" >
|
||||
<property name="text" >
|
||||
<string>Progress:</string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="infoMCLabel" >
|
||||
<property name="sizePolicy" >
|
||||
@ -479,7 +421,7 @@
|
||||
</font>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string/>
|
||||
<string>current operation here</string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
@ -497,12 +439,6 @@
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
@ -549,12 +485,6 @@
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="detailMCframe" >
|
||||
<property name="title" >
|
||||
@ -564,9 +494,6 @@
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
@ -625,12 +552,6 @@
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_3" >
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QTreeWidget" name="lastListView" >
|
||||
<property name="verticalScrollBarPolicy" >
|
||||
@ -684,12 +605,6 @@
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
|
@ -5,8 +5,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>578</width>
|
||||
<height>819</height>
|
||||
<width>588</width>
|
||||
<height>739</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
@ -31,16 +31,7 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<property name="margin" >
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
@ -120,7 +111,7 @@
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>230</width>
|
||||
<height>20</height>
|
||||
@ -186,7 +177,7 @@
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>20</height>
|
||||
@ -209,7 +200,7 @@
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>20</height>
|
||||
@ -312,7 +303,7 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Alternative address to communicate with the firewall:</string>
|
||||
<string>Address that will be used to communicate with the firewall:</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignVCenter</set>
|
||||
@ -347,22 +338,13 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title" >
|
||||
<string>Options for PIX and fwsm firewalls :</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="flat" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="5" column="0" colspan="2" >
|
||||
@ -477,7 +459,7 @@
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
@ -493,7 +475,7 @@
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
|
@ -235,46 +235,47 @@ iosaclAdvancedDialog::iosaclAdvancedDialog(QWidget *parent,FWObject *o)
|
||||
);
|
||||
/* Page "Compiler Options" */
|
||||
|
||||
data.registerOption( m_dialog->outputFileName , fwoptions,
|
||||
data.registerOption( m_dialog->outputFileName, fwoptions,
|
||||
"output_file" );
|
||||
|
||||
data.registerOption( m_dialog->iosacl_acl_basic , fwoptions,
|
||||
data.registerOption( m_dialog->iosacl_acl_basic, fwoptions,
|
||||
"iosacl_acl_basic" );
|
||||
|
||||
/*
|
||||
data.registerOption( m_dialog->iosacl_acl_alwaysNew , fwoptions,
|
||||
data.registerOption( m_dialog->iosacl_acl_alwaysNew, fwoptions,
|
||||
"iosacl_acl_always_new" );
|
||||
*/
|
||||
|
||||
data.registerOption( m_dialog->iosacl_acl_no_clear , fwoptions,
|
||||
data.registerOption( m_dialog->iosacl_acl_no_clear, fwoptions,
|
||||
"iosacl_acl_no_clear" );
|
||||
|
||||
data.registerOption( m_dialog->iosacl_acl_substitution , fwoptions,
|
||||
data.registerOption( m_dialog->iosacl_acl_substitution, fwoptions,
|
||||
"iosacl_acl_substitution" );
|
||||
|
||||
data.registerOption( m_dialog->iosacl_acl_temp_addr , fwoptions,
|
||||
data.registerOption( m_dialog->iosacl_acl_temp_addr, fwoptions,
|
||||
"iosacl_acl_temp_addr" );
|
||||
|
||||
data.registerOption( m_dialog->iosacl_include_comments , fwoptions,
|
||||
data.registerOption( m_dialog->iosacl_include_comments, fwoptions,
|
||||
"iosacl_include_comments" );
|
||||
|
||||
data.registerOption( m_dialog->iosacl_regroup_commands , fwoptions,
|
||||
data.registerOption( m_dialog->iosacl_regroup_commands, fwoptions,
|
||||
"iosacl_regroup_commands" );
|
||||
|
||||
data.registerOption( m_dialog->iosacl_check_shadowing , fwoptions,
|
||||
data.registerOption( m_dialog->iosacl_check_shadowing, fwoptions,
|
||||
"check_shading" );
|
||||
|
||||
data.registerOption( m_dialog->iosacl_ignore_empty_groups , fwoptions,
|
||||
data.registerOption( m_dialog->iosacl_ignore_empty_groups, fwoptions,
|
||||
"ignore_empty_groups" );
|
||||
|
||||
data.registerOption( m_dialog->mgmt_ssh , fwoptions, "mgmt_ssh" );
|
||||
data.registerOption( m_dialog->mgmt_addr , fwoptions, "mgmt_addr" );
|
||||
data.registerOption( m_dialog->mgmt_ssh, fwoptions, "mgmt_ssh" );
|
||||
data.registerOption( m_dialog->mgmt_addr, fwoptions, "mgmt_addr" );
|
||||
|
||||
/* page Installer */
|
||||
|
||||
data.registerOption( m_dialog->user, fwoptions, "admUser");
|
||||
data.registerOption( m_dialog->altAddress, fwoptions, "altAddress");
|
||||
data.registerOption( m_dialog->sshArgs, fwoptions, "sshArgs");
|
||||
data.registerOption( m_dialog->scpArgs, fwoptions, "scpArgs");
|
||||
|
||||
PolicyInstallScript *pis = mgmt->getPolicyInstallScript();
|
||||
|
||||
@ -283,10 +284,10 @@ iosaclAdvancedDialog::iosaclAdvancedDialog(QWidget *parent,FWObject *o)
|
||||
|
||||
|
||||
/* page "Prolog/Epilog" */
|
||||
data.registerOption( m_dialog->iosacl_prolog_script , fwoptions,
|
||||
data.registerOption( m_dialog->iosacl_prolog_script, fwoptions,
|
||||
"iosacl_prolog_script" );
|
||||
|
||||
data.registerOption( m_dialog->iosacl_epilog_script , fwoptions,
|
||||
data.registerOption( m_dialog->iosacl_epilog_script, fwoptions,
|
||||
"iosacl_epilog_script" );
|
||||
|
||||
/* page Logging */
|
||||
|
@ -8,8 +8,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>719</width>
|
||||
<height>719</height>
|
||||
<width>741</width>
|
||||
<height>711</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
@ -19,41 +19,11 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<property name="margin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="1" column="0" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
@ -62,7 +32,7 @@
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
@ -72,21 +42,6 @@
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="ok_button" >
|
||||
<property name="text" >
|
||||
@ -118,48 +73,17 @@
|
||||
<item row="0" column="0" >
|
||||
<widget class="QTabWidget" name="tabWidget" >
|
||||
<property name="currentIndex" >
|
||||
<number>4</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="TabPage" >
|
||||
<attribute name="title" >
|
||||
<string>Compiler Options</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4" >
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
<number>20</number>
|
||||
</property>
|
||||
<item row="3" column="1" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>170</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="3" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="textLabel1_5" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
@ -178,57 +102,22 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3" >
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLineEdit" name="outputFileName" >
|
||||
<property name="maximumSize" >
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>32767</width>
|
||||
<height>32767</height>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2" colspan="2" >
|
||||
<widget class="QLineEdit" name="mgmt_addr" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>32767</width>
|
||||
<height>32767</height>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QCheckBox" name="mgmt_ssh" >
|
||||
<property name="text" >
|
||||
<string>Always permit ssh access from
|
||||
the management workstation
|
||||
with this address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2" >
|
||||
<widget class="QGroupBox" name="frame114" >
|
||||
<property name="sizePolicy" >
|
||||
@ -240,23 +129,17 @@ with this address:</string>
|
||||
<property name="title" >
|
||||
<string>Policy Compiler Options</string>
|
||||
</property>
|
||||
<property name="flat" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="checkable" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="5" column="0" >
|
||||
@ -282,6 +165,58 @@ with this address:</string>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QCheckBox" name="mgmt_ssh" >
|
||||
<property name="text" >
|
||||
<string>Always permit ssh access from the management
|
||||
workstation with this address:</string>
|
||||
</property>
|
||||
<property name="checkable" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QLineEdit" name="mgmt_addr" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>32767</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>170</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab" >
|
||||
@ -289,22 +224,7 @@ with this address:</string>
|
||||
<string>Script Options</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="1" column="0" >
|
||||
@ -316,25 +236,10 @@ with this address:</string>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title" >
|
||||
<string>Options</string>
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
@ -369,25 +274,13 @@ with this address:</string>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title" >
|
||||
<string>Access lists (requires Firewall Builder for IOS ACL 2.1.12 and later)</string>
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="spacing" >
|
||||
<number>20</number>
|
||||
</property>
|
||||
<item row="0" column="1" >
|
||||
@ -433,7 +326,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
@ -468,24 +361,9 @@ First, create temporary access list to permit connections from the management su
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<property name="margin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="3" >
|
||||
<widget class="QLabel" name="iosacl_acl_temp_lbl" >
|
||||
<property name="text" >
|
||||
@ -507,7 +385,7 @@ First, create temporary access list to permit connections from the management su
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>20</height>
|
||||
@ -545,7 +423,7 @@ First, create temporary access list to permit connections from the management su
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>20</height>
|
||||
@ -604,163 +482,16 @@ First, create temporary access list to permit connections from the management su
|
||||
<attribute name="title" >
|
||||
<string>Installer</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox1" >
|
||||
<property name="title" >
|
||||
<string>External install script</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLineEdit" name="installScript" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="textLabel5_2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Policy install script (using built-in installer if this field is blank):</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="textLabel6_2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Command line options for the script:</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="installScriptArgs" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<layout class="QGridLayout" name="gridLayout_3" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox2" >
|
||||
<property name="title" >
|
||||
<string>Built-in installer</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout" >
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
<number>20</number>
|
||||
</property>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="textLabel1_3" >
|
||||
<property name="text" >
|
||||
<string>Alternative name or address used to communicate with the firewall (also putty session name on Windows)</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="textLabel1_2" >
|
||||
<property name="text" >
|
||||
@ -784,6 +515,19 @@ First, create temporary access list to permit connections from the management su
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="textLabel1_3" >
|
||||
<property name="text" >
|
||||
<string>Alternative name or address used to communicate with the firewall (also putty session name on Windows)</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="altAddress" >
|
||||
<property name="sizePolicy" >
|
||||
@ -796,21 +540,6 @@ First, create temporary access list to permit connections from the management su
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="textLabel1_7" >
|
||||
<property name="text" >
|
||||
@ -829,6 +558,42 @@ First, create temporary access list to permit connections from the management su
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2" >
|
||||
<layout class="QHBoxLayout" name="_2" >
|
||||
<item>
|
||||
<widget class="QLabel" name="textLabel1_8" >
|
||||
<property name="text" >
|
||||
<string>Additional command line parameters for scp</string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="scpArgs" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -836,6 +601,112 @@ First, create temporary access list to permit connections from the management su
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox1" >
|
||||
<property name="title" >
|
||||
<string>External install script</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2" >
|
||||
<property name="verticalSpacing" >
|
||||
<number>20</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" >
|
||||
<item>
|
||||
<widget class="QLabel" name="textLabel5_2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Policy install script (using built-in installer if this field is blank):</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="installScript" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" >
|
||||
<item>
|
||||
<widget class="QLabel" name="textLabel6_2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Command line options for the script:</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="installScriptArgs" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="TabPage2" >
|
||||
@ -843,22 +714,7 @@ First, create temporary access list to permit connections from the management su
|
||||
<string>Prolog/Epilog</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
@ -867,22 +723,7 @@ First, create temporary access list to permit connections from the management su
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="0" >
|
||||
@ -893,7 +734,7 @@ First, create temporary access list to permit connections from the management su
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
@ -933,22 +774,7 @@ First, create temporary access list to permit connections from the management su
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="1" >
|
||||
@ -966,7 +792,7 @@ First, create temporary access list to permit connections from the management su
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
@ -1019,22 +845,7 @@ First, create temporary access list to permit connections from the management su
|
||||
<string>Syslog</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="1" colspan="2" >
|
||||
@ -1140,22 +951,7 @@ First, create temporary access list to permit connections from the management su
|
||||
<string>Other logging destinations and levels:</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
@ -1189,7 +985,7 @@ First, create temporary access list to permit connections from the management su
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>675</width>
|
||||
<height>121</height>
|
||||
@ -1216,7 +1012,7 @@ First, create temporary access list to permit connections from the management su
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
@ -1243,7 +1039,7 @@ First, create temporary access list to permit connections from the management su
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
|
@ -80,56 +80,57 @@ ipfAdvancedDialog::ipfAdvancedDialog(QWidget *parent,FWObject *o)
|
||||
}
|
||||
|
||||
m_dialog->tabWidget->setTabEnabled(6,false); //Disable tab
|
||||
data.registerOption(m_dialog->ipv4before_2, fwopt, "ipv4_6_order", QStringList() << "IPv4 before IPv6" <<"ipv4_first" << "IPv6 before IPv4" << "ipv6_first" );
|
||||
data.registerOption( m_dialog->ipf_log_or_block ,fwopt, "ipf_log_or_block" );
|
||||
data.registerOption( m_dialog->ipf_log_body ,fwopt, "ipf_log_body" );
|
||||
data.registerOption( m_dialog->ipf_check_shadowing ,fwopt, "check_shading" );
|
||||
data.registerOption( m_dialog->ipf_eliminate_duplicates ,fwopt, "eliminate_duplicates");
|
||||
data.registerOption( m_dialog->ipf_accept_new_tcp_with_no_syn ,fwopt, "accept_new_tcp_with_no_syn");
|
||||
data.registerOption( m_dialog->ipf_in_out_code ,fwopt, "in_out_code" );
|
||||
data.registerOption( m_dialog->ipf_pass_all_out ,fwopt, "pass_all_out" );
|
||||
data.registerOption( m_dialog->ipf_ignore_empty_groups ,fwopt, "ignore_empty_groups");
|
||||
data.registerOption( m_dialog->ipf_return_icmp_as_dest ,fwopt, "ipf_return_icmp_as_dest");
|
||||
data.registerOption( m_dialog->ipf_nat_raudio_proxy ,fwopt, "ipf_nat_raudio_proxy");
|
||||
data.registerOption( m_dialog->ipf_nat_h323_proxy ,fwopt, "ipf_nat_h323_proxy");
|
||||
data.registerOption( m_dialog->ipf_nat_ipsec_proxy ,fwopt, "ipf_nat_ipsec_proxy");
|
||||
data.registerOption( m_dialog->ipf_nat_pptp_proxy ,fwopt, "ipf_nat_pptp_proxy");
|
||||
data.registerOption( m_dialog->ipf_nat_irc_proxy ,fwopt, "ipf_nat_irc_proxy");
|
||||
data.registerOption( m_dialog->ipf_nat_ftp_proxy ,fwopt, "ipf_nat_ftp_proxy");
|
||||
data.registerOption( m_dialog->ipf_nat_rcmd_proxy ,fwopt, "ipf_nat_rcmd_proxy");
|
||||
data.registerOption( m_dialog->ipf_fw_dir ,fwopt, "firewall_dir" );
|
||||
data.registerOption( m_dialog->ipf_user ,fwopt, "admUser" );
|
||||
data.registerOption( m_dialog->altAddress ,fwopt, "altAddress" );
|
||||
data.registerOption( m_dialog->sshArgs ,fwopt, "sshArgs" );
|
||||
data.registerOption( m_dialog->activationCmd ,fwopt, "activationCmd" );
|
||||
data.registerOption(m_dialog->ipv4before_2, fwopt, "ipv4_6_order", QStringList() << "IPv4 before IPv6" <<"ipv4_first" << "IPv6 before IPv4" << "ipv6_first" );
|
||||
data.registerOption( m_dialog->ipf_log_or_block,fwopt, "ipf_log_or_block" );
|
||||
data.registerOption( m_dialog->ipf_log_body,fwopt, "ipf_log_body" );
|
||||
data.registerOption( m_dialog->ipf_check_shadowing,fwopt, "check_shading" );
|
||||
data.registerOption( m_dialog->ipf_eliminate_duplicates,fwopt, "eliminate_duplicates");
|
||||
data.registerOption( m_dialog->ipf_accept_new_tcp_with_no_syn,fwopt, "accept_new_tcp_with_no_syn");
|
||||
data.registerOption( m_dialog->ipf_in_out_code,fwopt, "in_out_code" );
|
||||
data.registerOption( m_dialog->ipf_pass_all_out,fwopt, "pass_all_out" );
|
||||
data.registerOption( m_dialog->ipf_ignore_empty_groups,fwopt, "ignore_empty_groups");
|
||||
data.registerOption( m_dialog->ipf_return_icmp_as_dest,fwopt, "ipf_return_icmp_as_dest");
|
||||
data.registerOption( m_dialog->ipf_nat_raudio_proxy,fwopt, "ipf_nat_raudio_proxy");
|
||||
data.registerOption( m_dialog->ipf_nat_h323_proxy,fwopt, "ipf_nat_h323_proxy");
|
||||
data.registerOption( m_dialog->ipf_nat_ipsec_proxy,fwopt, "ipf_nat_ipsec_proxy");
|
||||
data.registerOption( m_dialog->ipf_nat_pptp_proxy,fwopt, "ipf_nat_pptp_proxy");
|
||||
data.registerOption( m_dialog->ipf_nat_irc_proxy,fwopt, "ipf_nat_irc_proxy");
|
||||
data.registerOption( m_dialog->ipf_nat_ftp_proxy,fwopt, "ipf_nat_ftp_proxy");
|
||||
data.registerOption( m_dialog->ipf_nat_rcmd_proxy,fwopt, "ipf_nat_rcmd_proxy");
|
||||
data.registerOption( m_dialog->ipf_fw_dir,fwopt, "firewall_dir" );
|
||||
data.registerOption( m_dialog->ipf_user,fwopt, "admUser" );
|
||||
data.registerOption( m_dialog->altAddress, fwopt, "altAddress");
|
||||
data.registerOption( m_dialog->sshArgs, fwopt, "sshArgs");
|
||||
data.registerOption( m_dialog->scpArgs, fwopt, "scpArgs");
|
||||
data.registerOption( m_dialog->activationCmd, fwopt, "activationCmd");
|
||||
|
||||
data.registerOption( m_dialog->ipf_manage_virtual_addr ,fwopt, "manage_virtual_addr");
|
||||
data.registerOption( m_dialog->ipf_configure_interfaces ,fwopt, "configure_interfaces");
|
||||
data.registerOption( m_dialog->ipf_debug ,fwopt, "debug" );
|
||||
data.registerOption( m_dialog->ipf_optimize ,fwopt, "optimize" );
|
||||
data.registerOption( m_dialog->ipf_dynAddr ,fwopt, "dynAddr" );
|
||||
data.registerOption( m_dialog->ipf_manage_virtual_addr,fwopt, "manage_virtual_addr");
|
||||
data.registerOption( m_dialog->ipf_configure_interfaces,fwopt, "configure_interfaces");
|
||||
data.registerOption( m_dialog->ipf_debug,fwopt, "debug" );
|
||||
data.registerOption( m_dialog->ipf_optimize,fwopt, "optimize" );
|
||||
data.registerOption( m_dialog->ipf_dynAddr,fwopt, "dynAddr" );
|
||||
|
||||
slm = getLogLevels( obj->getStr("platform").c_str() );
|
||||
m_dialog->logLevel->clear();
|
||||
m_dialog->logLevel->addItems( getScreenNames( slm ));
|
||||
data.registerOption( m_dialog->logLevel , fwopt, "ipf_log_level" , slm);
|
||||
data.registerOption( m_dialog->logLevel, fwopt, "ipf_log_level", slm);
|
||||
|
||||
slm = getLogFacilities( obj->getStr("platform").c_str() );
|
||||
m_dialog->logFacility->clear();
|
||||
m_dialog->logFacility->addItems( getScreenNames( slm ));
|
||||
data.registerOption( m_dialog->logFacility , fwopt, "ipf_log_facility", slm);
|
||||
data.registerOption( m_dialog->logFacility, fwopt, "ipf_log_facility", slm);
|
||||
|
||||
data.registerOption( m_dialog->compiler , fwopt, "compiler" );
|
||||
data.registerOption( m_dialog->compilerArgs , fwopt, "cmdline" );
|
||||
data.registerOption( m_dialog->outputFileName , fwopt, "output_file" );
|
||||
data.registerOption( m_dialog->compiler, fwopt, "compiler" );
|
||||
data.registerOption( m_dialog->compilerArgs, fwopt, "cmdline" );
|
||||
data.registerOption( m_dialog->outputFileName, fwopt, "output_file" );
|
||||
|
||||
slm=getActionsOnReject( obj->getStr("platform").c_str() );
|
||||
m_dialog->actionOnReject->clear();
|
||||
m_dialog->actionOnReject->addItems(getScreenNames(slm));
|
||||
|
||||
data.registerOption( m_dialog->actionOnReject , fwopt, "action_on_reject",slm);
|
||||
data.registerOption( m_dialog->mgmt_ssh , fwopt, "mgmt_ssh" );
|
||||
data.registerOption( m_dialog->mgmt_addr , fwopt, "mgmt_addr" );
|
||||
data.registerOption( m_dialog->actionOnReject, fwopt, "action_on_reject",slm);
|
||||
data.registerOption( m_dialog->mgmt_ssh, fwopt, "mgmt_ssh" );
|
||||
data.registerOption( m_dialog->mgmt_addr, fwopt, "mgmt_addr" );
|
||||
|
||||
PolicyInstallScript *pis = mgmt->getPolicyInstallScript();
|
||||
|
||||
@ -137,9 +138,9 @@ ipfAdvancedDialog::ipfAdvancedDialog(QWidget *parent,FWObject *o)
|
||||
m_dialog->installScriptArgs->setText( pis->getArguments().c_str() );
|
||||
|
||||
/* page "Prolog/Epilog" */
|
||||
data.registerOption( m_dialog->prolog_script , fwopt, "prolog_script" );
|
||||
data.registerOption( m_dialog->prolog_script, fwopt, "prolog_script" );
|
||||
|
||||
data.registerOption( m_dialog->epilog_script , fwopt, "epilog_script" );
|
||||
data.registerOption( m_dialog->epilog_script, fwopt, "epilog_script" );
|
||||
|
||||
data.loadAll();
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>709</width>
|
||||
<height>719</height>
|
||||
<width>685</width>
|
||||
<height>727</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
@ -16,41 +16,11 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<property name="margin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="1" column="0" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
@ -59,7 +29,7 @@
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
@ -101,29 +71,14 @@
|
||||
<item row="0" column="0" >
|
||||
<widget class="QTabWidget" name="tabWidget" >
|
||||
<property name="currentIndex" >
|
||||
<number>0</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab0" >
|
||||
<attribute name="title" >
|
||||
<string>Protocol Helpers</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="1" >
|
||||
@ -134,7 +89,7 @@
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
@ -171,7 +126,7 @@
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>100</height>
|
||||
@ -201,7 +156,7 @@
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>270</height>
|
||||
@ -249,22 +204,7 @@
|
||||
<string>Compiler</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="2" >
|
||||
@ -307,19 +247,7 @@ packet's destination</string>
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
@ -381,7 +309,7 @@ packet's destination</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>30</height>
|
||||
@ -397,7 +325,7 @@ packet's destination</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>30</height>
|
||||
@ -413,7 +341,7 @@ packet's destination</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>16</height>
|
||||
@ -502,7 +430,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>130</height>
|
||||
@ -610,166 +538,13 @@ with this address:</string>
|
||||
<attribute name="title" >
|
||||
<string>Installer</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox3" >
|
||||
<property name="title" >
|
||||
<string>External install script</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLineEdit" name="installScript" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="textLabel5_2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Policy install script (using built-in installer if this field is blank):</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="textLabel6_2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Command line options for the script:</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="installScriptArgs" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<layout class="QGridLayout" name="gridLayout_3" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox4" >
|
||||
<property name="title" >
|
||||
<string>Built-in installer</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label556" >
|
||||
<property name="text" >
|
||||
@ -793,60 +568,21 @@ with this address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="textLabel1_7" >
|
||||
<property name="text" >
|
||||
<string>Additional command line parameters for ssh</string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="sshArgs" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QLabel" name="textLabel1_4" >
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="textLabel1_2" >
|
||||
<property name="text" >
|
||||
<string>A command that installer should execute on the firewall in order to activate the policy (if this field is blank, installer runs firewall script in the directory specified above; it uses sudo if user name is not 'root')</string>
|
||||
<string>User name used to authenticate to the firewall (leave this empty if you use putty session):</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignVCenter</set>
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
<widget class="QLineEdit" name="activationCmd" >
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="ipf_user" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
@ -878,8 +614,21 @@ with this address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="ipf_user" >
|
||||
<item row="3" column="0" >
|
||||
<widget class="QLabel" name="textLabel1_4" >
|
||||
<property name="text" >
|
||||
<string>A command that installer should execute on the firewall in order to activate the policy (if this field is blank, installer runs firewall script in the directory specified above; it uses sudo if user name is not 'root')</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
<widget class="QLineEdit" name="activationCmd" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
@ -888,22 +637,188 @@ with this address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="textLabel1_2" >
|
||||
<property name="text" >
|
||||
<string>User name used to authenticate to the firewall (leave this empty if you use putty session):</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<item row="4" column="0" colspan="2" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<item>
|
||||
<widget class="QLabel" name="textLabel1_7" >
|
||||
<property name="text" >
|
||||
<string>Additional command line parameters for ssh</string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="sshArgs" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2" >
|
||||
<layout class="QHBoxLayout" name="_2" >
|
||||
<item>
|
||||
<widget class="QLabel" name="textLabel1_8" >
|
||||
<property name="text" >
|
||||
<string>Additional command line parameters for scp</string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="scpArgs" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox3" >
|
||||
<property name="title" >
|
||||
<string>External install script</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" >
|
||||
<item>
|
||||
<widget class="QLabel" name="textLabel5_2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Policy install script (using built-in installer if this field is blank):</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="installScript" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" >
|
||||
<item>
|
||||
<widget class="QLabel" name="textLabel6_2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Command line options for the script:</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="installScriptArgs" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab3" >
|
||||
@ -911,22 +826,7 @@ with this address:</string>
|
||||
<string>Prolog/Epilog</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
@ -935,22 +835,7 @@ with this address:</string>
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="0" >
|
||||
@ -961,7 +846,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
@ -1008,22 +893,7 @@ with this address:</string>
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="1" >
|
||||
@ -1041,7 +911,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
@ -1082,22 +952,7 @@ with this address:</string>
|
||||
<string>Logging</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="2" >
|
||||
@ -1108,7 +963,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
@ -1124,7 +979,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>130</width>
|
||||
<height>20</height>
|
||||
@ -1140,7 +995,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>20</height>
|
||||
@ -1156,7 +1011,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>240</height>
|
||||
@ -1212,7 +1067,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
@ -1227,22 +1082,7 @@ with this address:</string>
|
||||
<string>Script Options</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item rowspan="3" row="2" column="0" >
|
||||
@ -1253,7 +1093,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>70</height>
|
||||
@ -1313,7 +1153,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
@ -1329,7 +1169,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>200</height>
|
||||
@ -1370,7 +1210,7 @@ with this address:</string>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
@ -1397,7 +1237,7 @@ with this address:</string>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
|
@ -99,6 +99,7 @@ ipfwAdvancedDialog::ipfwAdvancedDialog(QWidget *parent,FWObject *o)
|
||||
data.registerOption( m_dialog->ipfw_user, fwopt, "admUser");
|
||||
data.registerOption( m_dialog->altAddress, fwopt, "altAddress");
|
||||
data.registerOption( m_dialog->sshArgs, fwopt, "sshArgs");
|
||||
data.registerOption( m_dialog->scpArgs, fwopt, "scpArgs");
|
||||
data.registerOption( m_dialog->activationCmd, fwopt, "activationCmd");
|
||||
|
||||
data.registerOption( m_dialog->ipfw_manage_virtual_addr, fwopt,
|
||||
|
@ -5,8 +5,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>691</width>
|
||||
<height>571</height>
|
||||
<width>685</width>
|
||||
<height>671</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
@ -16,22 +16,10 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<property name="margin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="1" column="0" >
|
||||
@ -39,16 +27,7 @@
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
@ -59,7 +38,7 @@
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
@ -101,62 +80,35 @@
|
||||
<item row="0" column="0" >
|
||||
<widget class="QTabWidget" name="tabWidget" >
|
||||
<property name="currentIndex" >
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab" >
|
||||
<attribute name="title" >
|
||||
<string>Compiler</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item rowspan="2" row="4" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<layout class="QGridLayout" name="gridLayout_4" >
|
||||
<item row="0" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="compilerLabel" >
|
||||
<property name="text" >
|
||||
<string>Compiler:</string>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</spacer>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<item row="0" column="2" >
|
||||
<widget class="QLineEdit" name="compiler" >
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
<width>32767</width>
|
||||
<height>32767</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="compilerArgsLabel" >
|
||||
@ -177,16 +129,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="compilerLabel" >
|
||||
<property name="text" >
|
||||
<string>Compiler:</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
<item row="1" column="2" >
|
||||
<widget class="QLineEdit" name="compilerArgs" >
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>32767</width>
|
||||
<height>32767</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -219,71 +168,49 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" >
|
||||
<widget class="QLineEdit" name="compilerArgs" >
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>32767</width>
|
||||
<height>32767</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" >
|
||||
<widget class="QLineEdit" name="compiler" >
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>32767</width>
|
||||
<height>32767</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="2" >
|
||||
<item row="3" column="1" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="7" column="2" >
|
||||
<widget class="QLineEdit" name="mgmt_addr" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<item rowspan="2" row="4" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>32767</width>
|
||||
<height>32767</height>
|
||||
<width>40</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="6" column="1" colspan="2" >
|
||||
<widget class="QCheckBox" name="ipfw_ignore_empty_groups" >
|
||||
<item row="4" column="1" colspan="2" >
|
||||
<widget class="QCheckBox" name="ipfw_add_check_state_rule" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>If the option is deactivated, compiler treats empty groups as an error and aborts processing the policy. If this option is activated, compiler removes all empty groups from all rule elements. If rule element becomes 'any' after the last empty group has been removed, the whole rule will be ignored. Use this option only if you fully understand how it works!</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Ignore empty groups in rules</string>
|
||||
<string>Add rule to accept packets matching dynamic rules created for
|
||||
known sessions on top of the policy (action 'check-state')</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -303,21 +230,23 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" colspan="2" >
|
||||
<widget class="QCheckBox" name="ipfw_add_check_state_rule" >
|
||||
<item row="6" column="1" colspan="2" >
|
||||
<widget class="QCheckBox" name="ipfw_ignore_empty_groups" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>If the option is deactivated, compiler treats empty groups as an error and aborts processing the policy. If this option is activated, compiler removes all empty groups from all rule elements. If rule element becomes 'any' after the last empty group has been removed, the whole rule will be ignored. Use this option only if you fully understand how it works!</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Add rule to accept packets matching dynamic rules created for
|
||||
known sessions on top of the policy (action 'check-state')</string>
|
||||
<string>Ignore empty groups in rules</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1" >
|
||||
<item rowspan="2" row="7" column="1" colspan="2" >
|
||||
<widget class="QCheckBox" name="mgmt_ssh" >
|
||||
<property name="text" >
|
||||
<string>Always permit ssh access from
|
||||
@ -326,32 +255,23 @@ with this address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab1" >
|
||||
<attribute name="title" >
|
||||
<string>Installer</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="0" >
|
||||
<item row="8" column="2" >
|
||||
<widget class="QLineEdit" name="mgmt_addr" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>32767</width>
|
||||
<height>32767</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="2" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
@ -359,149 +279,27 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox1" >
|
||||
<property name="title" >
|
||||
<string>External install script</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLineEdit" name="installScript" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="textLabel5_2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Policy install script (using built-in installer if this field is blank):</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="textLabel6_2_2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Command line options for the script:</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="installScriptArgs" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab1" >
|
||||
<attribute name="title" >
|
||||
<string>Installer</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_3" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox2" >
|
||||
<property name="title" >
|
||||
<string>Built-in installer</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="textLabel1_3" >
|
||||
<property name="text" >
|
||||
<string>Alternative name or address used to communicate with the firewall (also putty session name on Windows)</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="textLabel1_2" >
|
||||
<property name="text" >
|
||||
<string>User name used to authenticate to the firewall (leave this empty if you use putty session):</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<layout class="QGridLayout" name="gridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label556" >
|
||||
<property name="text" >
|
||||
@ -525,6 +323,19 @@ with this address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="textLabel1_2" >
|
||||
<property name="text" >
|
||||
<string>User name used to authenticate to the firewall (leave this empty if you use putty session):</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="ipfw_user" >
|
||||
<property name="sizePolicy" >
|
||||
@ -535,18 +346,21 @@ with this address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QLineEdit" name="altAddress" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="textLabel1_3" >
|
||||
<property name="text" >
|
||||
<string>Alternative name or address used to communicate with the firewall (also putty session name on Windows)</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
<widget class="QLineEdit" name="activationCmd" >
|
||||
<item row="2" column="1" >
|
||||
<widget class="QLineEdit" name="altAddress" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
@ -568,21 +382,22 @@ with this address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
<widget class="QLineEdit" name="activationCmd" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
@ -603,6 +418,42 @@ with this address:</string>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2" >
|
||||
<layout class="QHBoxLayout" name="_2" >
|
||||
<item>
|
||||
<widget class="QLabel" name="textLabel1_8" >
|
||||
<property name="text" >
|
||||
<string>Additional command line parameters for scp</string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="scpArgs" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -610,6 +461,109 @@ with this address:</string>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox1" >
|
||||
<property name="title" >
|
||||
<string>External install script</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2" >
|
||||
<item row="0" column="0" >
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" >
|
||||
<item>
|
||||
<widget class="QLabel" name="textLabel5_2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Policy install script (using built-in installer if this field is blank):</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="installScript" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" >
|
||||
<item>
|
||||
<widget class="QLabel" name="textLabel6_2_2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Command line options for the script:</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="installScriptArgs" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab2" >
|
||||
@ -617,22 +571,10 @@ with this address:</string>
|
||||
<string>Prolog/Epilog</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="1" column="0" >
|
||||
@ -641,22 +583,10 @@ with this address:</string>
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="1" >
|
||||
@ -674,7 +604,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
@ -707,22 +637,10 @@ with this address:</string>
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="0" >
|
||||
@ -733,7 +651,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
@ -774,22 +692,10 @@ with this address:</string>
|
||||
<string>Script Options</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item rowspan="3" row="2" column="0" >
|
||||
@ -800,7 +706,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>70</height>
|
||||
@ -850,7 +756,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>230</height>
|
||||
@ -866,7 +772,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
@ -893,7 +799,7 @@ with this address:</string>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
@ -920,7 +826,7 @@ with this address:</string>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
|
@ -79,91 +79,95 @@ iptAdvancedDialog::iptAdvancedDialog(QWidget *parent,FWObject *o)
|
||||
}
|
||||
|
||||
//QString s = fwoptions->getStr("ipv4_6_order")
|
||||
data.registerOption(m_dialog->ipv4before, fwoptions, "ipv4_6_order", QStringList() << "IPv4 before IPv6" <<"ipv4_first" << "IPv6 before IPv4" << "ipv6_first" );
|
||||
data.registerOption(m_dialog->ipv4before, fwoptions, "ipv4_6_order", QStringList() << "IPv4 before IPv6" <<"ipv4_first" << "IPv6 before IPv4" << "ipv6_first");
|
||||
|
||||
data.registerOption(m_dialog->logTCPseq, fwoptions, "log_tcp_seq" );
|
||||
data.registerOption(m_dialog->logTCPopt, fwoptions, "log_tcp_opt" );
|
||||
data.registerOption(m_dialog->logIPopt, fwoptions, "log_ip_opt" );
|
||||
data.registerOption(m_dialog->logNumsyslog, fwoptions, "use_numeric_log_levels" );
|
||||
data.registerOption(m_dialog->logTCPseq, fwoptions, "log_tcp_seq");
|
||||
data.registerOption(m_dialog->logTCPopt, fwoptions, "log_tcp_opt");
|
||||
data.registerOption(m_dialog->logIPopt, fwoptions, "log_ip_opt");
|
||||
data.registerOption(m_dialog->logNumsyslog, fwoptions,
|
||||
"use_numeric_log_levels");
|
||||
|
||||
slm = getLogLevels( obj->getStr("platform").c_str() );
|
||||
slm = getLogLevels( obj->getStr("platform").c_str());
|
||||
m_dialog->logLevel->clear();
|
||||
m_dialog->logLevel->addItems( getScreenNames(slm));
|
||||
data.registerOption(m_dialog-> logLevel, fwoptions, "log_level", slm);
|
||||
data.registerOption(m_dialog-> logLevel, fwoptions, "log_level", slm);
|
||||
|
||||
data.registerOption(m_dialog->useULOG, fwoptions, "use_ULOG" );
|
||||
data.registerOption(m_dialog->cprange, fwoptions, "ulog_cprange" );
|
||||
data.registerOption(m_dialog->qthreshold, fwoptions, "ulog_qthreshold" );
|
||||
data.registerOption(m_dialog->nlgroup, fwoptions, "ulog_nlgroup" );
|
||||
data.registerOption(m_dialog->logprefix, fwoptions, "log_prefix" );
|
||||
data.registerOption(m_dialog->useULOG, fwoptions, "use_ULOG");
|
||||
data.registerOption(m_dialog->cprange, fwoptions, "ulog_cprange");
|
||||
data.registerOption(m_dialog->qthreshold, fwoptions, "ulog_qthreshold");
|
||||
data.registerOption(m_dialog->nlgroup, fwoptions, "ulog_nlgroup");
|
||||
data.registerOption(m_dialog->logprefix, fwoptions, "log_prefix");
|
||||
|
||||
slm=getLimitSuffixes( obj->getStr("platform").c_str() );
|
||||
slm=getLimitSuffixes( obj->getStr("platform").c_str());
|
||||
m_dialog->logLimitSuffix->clear();
|
||||
m_dialog->logLimitSuffix->addItems(getScreenNames(slm));
|
||||
data.registerOption(m_dialog-> logLimitSuffix, fwoptions, "limit_suffix", slm);
|
||||
data.registerOption(m_dialog-> logLimitSuffix, fwoptions,
|
||||
"limit_suffix", slm);
|
||||
|
||||
data.registerOption(m_dialog->logLimitVal, fwoptions, "limit_value");
|
||||
data.registerOption(m_dialog->logAll, fwoptions, "log_all");
|
||||
data.registerOption(m_dialog->compiler, fwoptions, "compiler");
|
||||
data.registerOption(m_dialog->compilerArgs, fwoptions, "cmdline");
|
||||
data.registerOption(m_dialog->outputFileName, fwoptions, "output_file");
|
||||
data.registerOption(m_dialog->logLimitVal, fwoptions, "limit_value");
|
||||
data.registerOption(m_dialog->logAll, fwoptions, "log_all");
|
||||
data.registerOption(m_dialog->compiler, fwoptions, "compiler");
|
||||
data.registerOption(m_dialog->compilerArgs, fwoptions, "cmdline");
|
||||
data.registerOption(m_dialog->outputFileName, fwoptions, "output_file");
|
||||
data.registerOption(m_dialog->assumeFwIsPartOfAny,
|
||||
fwoptions, "firewall_is_part_of_any_and_networks");
|
||||
data.registerOption(m_dialog->acceptSessions,
|
||||
fwoptions, "accept_new_tcp_with_no_syn");
|
||||
data.registerOption(m_dialog->dropInvalid, fwoptions, "drop_invalid");
|
||||
data.registerOption(m_dialog->logInvalid, fwoptions, "log_invalid");
|
||||
data.registerOption(m_dialog->acceptESTBeforeFirst, fwoptions, "accept_established");
|
||||
data.registerOption(m_dialog->bridge, fwoptions, "bridging_fw");
|
||||
data.registerOption(m_dialog->shadowing, fwoptions, "check_shading");
|
||||
data.registerOption(m_dialog->emptyGroups, fwoptions, "ignore_empty_groups");
|
||||
data.registerOption(m_dialog->localNAT, fwoptions, "local_nat");
|
||||
data.registerOption(m_dialog->clampMSStoMTU, fwoptions, "clamp_mss_to_mtu");
|
||||
data.registerOption(m_dialog->dropInvalid, fwoptions, "drop_invalid");
|
||||
data.registerOption(m_dialog->logInvalid, fwoptions, "log_invalid");
|
||||
data.registerOption(m_dialog->acceptESTBeforeFirst, fwoptions,
|
||||
"accept_established");
|
||||
data.registerOption(m_dialog->bridge, fwoptions, "bridging_fw");
|
||||
data.registerOption(m_dialog->shadowing, fwoptions, "check_shading");
|
||||
data.registerOption(m_dialog->emptyGroups, fwoptions,
|
||||
"ignore_empty_groups");
|
||||
data.registerOption(m_dialog->localNAT, fwoptions, "local_nat");
|
||||
data.registerOption(m_dialog->clampMSStoMTU, fwoptions, "clamp_mss_to_mtu");
|
||||
data.registerOption(m_dialog->makeTagClassifyTerminating,
|
||||
fwoptions, "classify_mark_terminating");
|
||||
slm=getActionsOnReject( obj->getStr("platform").c_str() );
|
||||
slm=getActionsOnReject( obj->getStr("platform").c_str());
|
||||
m_dialog->actionOnReject->clear();
|
||||
m_dialog->actionOnReject->addItems(getScreenNames(slm));
|
||||
data.registerOption(m_dialog-> actionOnReject,
|
||||
fwoptions,"action_on_reject", slm);
|
||||
|
||||
data.registerOption(m_dialog->mgmt_ssh, fwoptions, "mgmt_ssh" );
|
||||
data.registerOption(m_dialog->mgmt_addr, fwoptions, "mgmt_addr" );
|
||||
data.registerOption(m_dialog->mgmt_ssh, fwoptions, "mgmt_ssh");
|
||||
data.registerOption(m_dialog->mgmt_addr, fwoptions, "mgmt_addr");
|
||||
data.registerOption(m_dialog->addVirtualsforNAT,
|
||||
fwoptions, "manage_virtual_addr" );
|
||||
fwoptions, "manage_virtual_addr");
|
||||
data.registerOption(m_dialog->configureInterfaces,
|
||||
fwoptions, "configure_interfaces" );
|
||||
data.registerOption(m_dialog->iptDebug, fwoptions, "debug" );
|
||||
data.registerOption(m_dialog->verifyInterfaces, fwoptions, "verify_interfaces" );
|
||||
data.registerOption(m_dialog->loadModules, fwoptions, "load_modules" );
|
||||
fwoptions, "configure_interfaces");
|
||||
data.registerOption(m_dialog->iptDebug, fwoptions, "debug");
|
||||
data.registerOption(m_dialog->verifyInterfaces, fwoptions, "verify_interfaces");
|
||||
data.registerOption(m_dialog->loadModules, fwoptions, "load_modules");
|
||||
data.registerOption(m_dialog->iptablesRestoreActivation,
|
||||
fwoptions, "use_iptables_restore" );
|
||||
data.registerOption(m_dialog->ipt_fw_dir, fwoptions, "firewall_dir" );
|
||||
data.registerOption(m_dialog->ipt_user, fwoptions, "admUser" );
|
||||
data.registerOption(m_dialog->altAddress, fwoptions, "altAddress" );
|
||||
data.registerOption(m_dialog->sshArgs, fwoptions, "sshArgs" );
|
||||
data.registerOption(m_dialog->activationCmd, fwoptions, "activationCmd" );
|
||||
|
||||
fwoptions, "use_iptables_restore");
|
||||
data.registerOption(m_dialog->ipt_fw_dir, fwoptions, "firewall_dir");
|
||||
data.registerOption(m_dialog->ipt_user, fwoptions, "admUser");
|
||||
data.registerOption(m_dialog->altAddress, fwoptions, "altAddress");
|
||||
data.registerOption(m_dialog->sshArgs, fwoptions, "sshArgs");
|
||||
data.registerOption( m_dialog->scpArgs, fwoptions, "scpArgs");
|
||||
data.registerOption(m_dialog->activationCmd, fwoptions, "activationCmd");
|
||||
|
||||
PolicyInstallScript *pis = mgmt->getPolicyInstallScript();
|
||||
|
||||
m_dialog->installScript->setText( pis->getCommand().c_str() );
|
||||
m_dialog->installScriptArgs->setText( pis->getArguments().c_str() );
|
||||
m_dialog->installScript->setText( pis->getCommand().c_str());
|
||||
m_dialog->installScriptArgs->setText( pis->getArguments().c_str());
|
||||
|
||||
|
||||
/* page "Prolog/Epilog" */
|
||||
|
||||
data.registerOption(m_dialog->prolog_script, fwoptions,
|
||||
"prolog_script" );
|
||||
"prolog_script");
|
||||
|
||||
slm = getPrologPlaces( obj->getStr("platform").c_str() );
|
||||
slm = getPrologPlaces( obj->getStr("platform").c_str());
|
||||
m_dialog->prologPlace->clear();
|
||||
m_dialog->prologPlace->addItems(getScreenNames(slm));
|
||||
data.registerOption(m_dialog-> prologPlace, fwoptions,
|
||||
"prolog_place", slm);
|
||||
|
||||
data.registerOption(m_dialog->epilog_script, fwoptions,
|
||||
"epilog_script" );
|
||||
"epilog_script");
|
||||
|
||||
data.loadAll();
|
||||
switchLOG_ULOG();
|
||||
@ -199,8 +203,8 @@ void iptAdvancedDialog::accept()
|
||||
if (mgmt_addr)
|
||||
mgmt->setAddress(*mgmt_addr);
|
||||
|
||||
pis->setCommand( m_dialog->installScript->text().toLatin1().constData() );
|
||||
pis->setArguments( m_dialog->installScriptArgs->text().toLatin1().constData() );
|
||||
pis->setCommand( m_dialog->installScript->text().toLatin1().constData());
|
||||
pis->setArguments( m_dialog->installScriptArgs->text().toLatin1().constData());
|
||||
|
||||
mw->updateLastModifiedTimestampForAllFirewalls(obj);
|
||||
QDialog::accept();
|
||||
@ -215,18 +219,18 @@ void iptAdvancedDialog::editProlog()
|
||||
{
|
||||
SimpleTextEditor edt(this,
|
||||
m_dialog->prolog_script->toPlainText(),
|
||||
true, tr( "Script Editor" ) );
|
||||
true, tr( "Script Editor" ));
|
||||
if ( edt.exec() == QDialog::Accepted )
|
||||
m_dialog->prolog_script->setText( edt.text() );
|
||||
m_dialog->prolog_script->setText( edt.text());
|
||||
}
|
||||
|
||||
void iptAdvancedDialog::editEpilog()
|
||||
{
|
||||
SimpleTextEditor edt(this,
|
||||
m_dialog->epilog_script->toPlainText(),
|
||||
true, tr( "Script Editor" ) );
|
||||
true, tr( "Script Editor" ));
|
||||
if ( edt.exec() == QDialog::Accepted )
|
||||
m_dialog->epilog_script->setText( edt.text() );
|
||||
m_dialog->epilog_script->setText( edt.text());
|
||||
}
|
||||
|
||||
void iptAdvancedDialog::help()
|
||||
|
@ -9,7 +9,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>687</width>
|
||||
<height>719</height>
|
||||
<height>666</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
@ -41,22 +41,7 @@
|
||||
<string>Compiler</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="1" column="0" colspan="3" >
|
||||
@ -112,7 +97,7 @@
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Maximum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>150</height>
|
||||
@ -240,7 +225,7 @@ no known connection</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>20</height>
|
||||
@ -253,7 +238,7 @@ no known connection</string>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>32767</width>
|
||||
<height>32767</height>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
@ -263,7 +248,7 @@ no known connection</string>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>32767</width>
|
||||
<height>32767</height>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
@ -273,7 +258,7 @@ no known connection</string>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>32767</width>
|
||||
<height>32767</height>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
@ -312,7 +297,7 @@ no known connection</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
@ -344,7 +329,7 @@ no known connection</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>50</height>
|
||||
@ -395,7 +380,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>72</width>
|
||||
<height>20</height>
|
||||
@ -416,176 +401,13 @@ with this address:</string>
|
||||
<attribute name="title" >
|
||||
<string>Installer</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox1" >
|
||||
<property name="title" >
|
||||
<string>External install script</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLineEdit" name="installScript" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="textLabel5_2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Policy install script (using built-in installer if this field is blank):</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="textLabel6_2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Command line options for the script:</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="installScriptArgs" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<layout class="QGridLayout" name="gridLayout_3" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox2" >
|
||||
<property name="title" >
|
||||
<string>Built-in installer</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="textLabel1_3" >
|
||||
<property name="text" >
|
||||
<string>Alternative name or address used to communicate with the firewall (also putty session name on Windows)</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="textLabel1_2" >
|
||||
<property name="text" >
|
||||
<string>User name used to authenticate to the firewall (leave this empty if you use putty session):</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<layout class="QGridLayout" name="gridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label556" >
|
||||
<property name="text" >
|
||||
@ -609,6 +431,19 @@ with this address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="textLabel1_2" >
|
||||
<property name="text" >
|
||||
<string>User name used to authenticate to the firewall (leave this empty if you use putty session):</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="ipt_user" >
|
||||
<property name="sizePolicy" >
|
||||
@ -619,18 +454,21 @@ with this address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QLineEdit" name="altAddress" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="textLabel1_3" >
|
||||
<property name="text" >
|
||||
<string>Alternative name or address used to communicate with the firewall (also putty session name on Windows)</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
<widget class="QLineEdit" name="activationCmd" >
|
||||
<item row="2" column="1" >
|
||||
<widget class="QLineEdit" name="altAddress" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
@ -652,23 +490,18 @@ with this address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
<widget class="QLineEdit" name="activationCmd" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="textLabel1_7" >
|
||||
<property name="text" >
|
||||
@ -687,6 +520,42 @@ with this address:</string>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2" >
|
||||
<layout class="QHBoxLayout" name="_2" >
|
||||
<item>
|
||||
<widget class="QLabel" name="textLabel1_8" >
|
||||
<property name="text" >
|
||||
<string>Additional command line parameters for scp</string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="scpArgs" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -694,6 +563,109 @@ with this address:</string>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox1" >
|
||||
<property name="title" >
|
||||
<string>External install script</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2" >
|
||||
<item row="0" column="0" >
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" >
|
||||
<item>
|
||||
<widget class="QLabel" name="textLabel5_2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Policy install script (using built-in installer if this field is blank):</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="installScript" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" >
|
||||
<item>
|
||||
<widget class="QLabel" name="textLabel6_2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Command line options for the script:</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="installScriptArgs" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab2" >
|
||||
@ -701,22 +673,7 @@ with this address:</string>
|
||||
<string>Prolog/Epilog</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="1" column="0" >
|
||||
@ -725,22 +682,7 @@ with this address:</string>
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="1" >
|
||||
@ -758,7 +700,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
@ -791,22 +733,7 @@ with this address:</string>
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="1" column="0" colspan="3" >
|
||||
@ -877,46 +804,16 @@ with this address:</string>
|
||||
<string>Logging</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<property name="margin" >
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item rowspan="5" row="0" column="0" >
|
||||
<widget class="QGroupBox" name="buttonGroup1" >
|
||||
<property name="title" >
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="1" >
|
||||
@ -940,22 +837,10 @@ with this address:</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="WStackPage0" >
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="spacing" >
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="2" >
|
||||
@ -1003,22 +888,10 @@ with this address:</string>
|
||||
</widget>
|
||||
<widget class="QWidget" name="WStackPage1" >
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="spacing" >
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item row="0" column="1" >
|
||||
@ -1083,7 +956,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>16</height>
|
||||
@ -1183,7 +1056,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
@ -1199,7 +1072,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>16</height>
|
||||
@ -1211,25 +1084,10 @@ with this address:</string>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab4" >
|
||||
<attribute name="title" >
|
||||
<string>Script Options</string>
|
||||
<string>Script</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="3" >
|
||||
@ -1253,7 +1111,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
@ -1286,7 +1144,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Maximum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>120</height>
|
||||
@ -1330,7 +1188,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>200</height>
|
||||
@ -1371,7 +1229,7 @@ with this address:</string>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
@ -1384,7 +1242,7 @@ with this address:</string>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
@ -1413,7 +1271,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>351</width>
|
||||
<height>27</height>
|
||||
|
@ -340,9 +340,10 @@ int main( int argc, char *argv[] )
|
||||
{
|
||||
|
||||
|
||||
bool ssh_wrapper=false;
|
||||
bool ssh_wrapper = false;
|
||||
bool scp_wrapper = false;
|
||||
const char *arg[64];
|
||||
int i, j;
|
||||
int i, j;
|
||||
|
||||
filename = "";
|
||||
print_output_file_name = "";
|
||||
@ -376,14 +377,16 @@ int main( int argc, char *argv[] )
|
||||
{
|
||||
if (strncmp(argv[i], "-X", 2)==0) { ssh_wrapper=true; continue; }
|
||||
else
|
||||
if (strncmp(argv[i], "-d", 2)==0) { fwbdebug++; continue; }
|
||||
if (strncmp(argv[i], "-Y", 2)==0) { scp_wrapper=true; continue; }
|
||||
else
|
||||
arg[j] = strdup(argv[i]);
|
||||
if (strncmp(argv[i], "-d", 2)==0) { fwbdebug++; continue; }
|
||||
else
|
||||
arg[j] = strdup(argv[i]);
|
||||
j++;
|
||||
}
|
||||
arg[j] = NULL;
|
||||
|
||||
if (ssh_wrapper)
|
||||
if (ssh_wrapper || scp_wrapper)
|
||||
{
|
||||
|
||||
/* need to create and initialize settings to be able to use ssh/scp
|
||||
@ -394,15 +397,23 @@ int main( int argc, char *argv[] )
|
||||
/* initialize preferences */
|
||||
st->init();
|
||||
|
||||
QString sshcmd=st->getSSHPath();
|
||||
if (ssh_wrapper)
|
||||
{
|
||||
QString sshcmd = st->getSSHPath();
|
||||
if (sshcmd.isEmpty()) sshcmd = "ssh";
|
||||
arg[0] = strdup( sshcmd.toLatin1().constData() );
|
||||
}
|
||||
|
||||
if (sshcmd.isEmpty()) sshcmd="ssh";
|
||||
|
||||
arg[0]=strdup( sshcmd.toLatin1().constData() );
|
||||
if (scp_wrapper)
|
||||
{
|
||||
QString scpcmd = st->getSCPPath();
|
||||
if (scpcmd.isEmpty()) scpcmd = "scp";
|
||||
arg[0] = strdup( scpcmd.toLatin1().constData() );
|
||||
}
|
||||
|
||||
if (fwbdebug)
|
||||
{
|
||||
qDebug("cmd: %s",arg[0]);
|
||||
qDebug("cmd: %s", arg[0]);
|
||||
qDebug("Arguments:");
|
||||
for (const char **cptr = arg; *cptr!=NULL; cptr++)
|
||||
{
|
||||
@ -419,7 +430,7 @@ int main( int argc, char *argv[] )
|
||||
char slave_name[64];
|
||||
// char *pgm;
|
||||
|
||||
pid=forkpty(&mfd,slave_name,NULL,NULL);
|
||||
pid = forkpty(&mfd,slave_name,NULL,NULL);
|
||||
if (pid<0)
|
||||
{
|
||||
qDebug("Fork failed: %s", strerror(errno));
|
||||
@ -463,7 +474,7 @@ int main( int argc, char *argv[] )
|
||||
tv.tv_usec = 0;
|
||||
|
||||
FD_ZERO(&rfds);
|
||||
FD_SET(mfd, &rfds);
|
||||
FD_SET(mfd, &rfds);
|
||||
if (!endOfStream) FD_SET(STDIN_FILENO , &rfds);
|
||||
|
||||
retval = select( max(STDIN_FILENO,mfd)+1 , &rfds, NULL, NULL, &tv);
|
||||
|
@ -135,8 +135,9 @@ pfAdvancedDialog::pfAdvancedDialog(QWidget *parent,FWObject *o)
|
||||
data.registerOption( m_dialog->pf_fw_dir ,fwopt, "firewall_dir" );
|
||||
data.registerOption( m_dialog->pf_user ,fwopt, "admUser" );
|
||||
data.registerOption( m_dialog->altAddress ,fwopt, "altAddress" );
|
||||
data.registerOption( m_dialog->sshArgs ,fwopt, "sshArgs" );
|
||||
data.registerOption( m_dialog->activationCmd ,fwopt, "activationCmd" );
|
||||
data.registerOption( m_dialog->sshArgs, fwopt, "sshArgs");
|
||||
data.registerOption( m_dialog->scpArgs, fwopt, "scpArgs");
|
||||
data.registerOption( m_dialog->activationCmd, fwopt, "activationCmd");
|
||||
|
||||
data.registerOption( m_dialog->pf_manage_virtual_addr ,fwopt, "manage_virtual_addr" );
|
||||
data.registerOption( m_dialog->pf_configure_interfaces,fwopt, "configure_interfaces");
|
||||
|
@ -5,10 +5,16 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>691</width>
|
||||
<height>662</height>
|
||||
<width>687</width>
|
||||
<height>685</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>700</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>pf: advanced settings</string>
|
||||
</property>
|
||||
@ -16,8 +22,17 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="spacing" >
|
||||
<number>20</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QTabWidget" name="tabWidget" >
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>663</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
@ -25,20 +40,11 @@
|
||||
<attribute name="title" >
|
||||
<string>Compiler</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
<layout class="QGridLayout" name="gridLayout_8" >
|
||||
<property name="verticalSpacing" >
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="3" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="compilerLabel" >
|
||||
<property name="text" >
|
||||
<string>Compiler:</string>
|
||||
@ -51,7 +57,17 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="3" >
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLineEdit" name="compiler" >
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>32767</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="compilerArgsLabel" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
@ -70,122 +86,17 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="2" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="14" column="3" >
|
||||
<widget class="QLineEdit" name="mgmt_addr" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="compilerArgs" >
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>32767</width>
|
||||
<height>32767</height>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="14" column="1" colspan="2" >
|
||||
<widget class="QCheckBox" name="mgmt_ssh" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Always permit ssh access from
|
||||
the management workstation
|
||||
with this address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1" colspan="3" >
|
||||
<widget class="QCheckBox" name="pf_accept_new_tcp_with_no_syn" >
|
||||
<property name="text" >
|
||||
<string>Accept TCP sessions opened prior to firewall restart</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1" colspan="3" >
|
||||
<widget class="QCheckBox" name="pf_modulate_state" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Modulate state for all stateful rules (applies only to TCP services)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1" colspan="3" >
|
||||
<widget class="QCheckBox" name="pf_check_shadowing" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Shadowing happens because a rule is a superset of a subsequent rule and any packets potentially matched by the subsequent rule have already been matched by the prior rule.</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Detect rule shadowing in policy</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1" colspan="3" >
|
||||
<widget class="QCheckBox" name="pf_ignore_empty_groups" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>If the option is deactivated, compiler treats empty groups as an error and aborts processing the policy. If this option is activated, compiler removes all empty groups from all rule elements. If rule element becomes 'any' after the last empty group has been removed, the whole rule will be ignored. Use this option only if you fully understand how it works!</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Ignore empty groups in rules</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="3" >
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="textLabel1_5" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
@ -204,207 +115,262 @@ with this address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3" >
|
||||
<item row="2" column="1" >
|
||||
<widget class="QLineEdit" name="outputFileName" >
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>32767</width>
|
||||
<height>32767</height>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3" >
|
||||
<widget class="QLineEdit" name="compiler" >
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>32767</width>
|
||||
<height>32767</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3" >
|
||||
<widget class="QLineEdit" name="compilerArgs" >
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>32767</width>
|
||||
<height>32767</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1" colspan="3" >
|
||||
<item row="3" column="0" colspan="2" >
|
||||
<widget class="QGroupBox" name="buttonGroup2" >
|
||||
<property name="title" >
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QRadioButton" name="pf_pass_all_out" >
|
||||
<property name="flat" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label571" >
|
||||
<property name="text" >
|
||||
<string>Pass all outgoing</string>
|
||||
<string>There are two ways compiler can generate code for rules in the Global Policy: it can either create two pf rules to control both incoming and outgoing packets for each rule, or it can create only one pf rule for incoming packets and permit all outgoing ones.You get more control over the packets crossing the firewall in the first mode, but generated script is going to be smaller if you choose the second.</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QRadioButton" name="pf_in_out_code" >
|
||||
<item row="1" column="0" >
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5" >
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="pf_in_out_code" >
|
||||
<property name="text" >
|
||||
<string>Generate both 'in' and 'out' rules</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="pf_pass_all_out" >
|
||||
<property name="text" >
|
||||
<string>Pass all outgoing</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2" >
|
||||
<widget class="QGroupBox" name="groupBox" >
|
||||
<property name="title" >
|
||||
<string/>
|
||||
</property>
|
||||
<property name="flat" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_6" >
|
||||
<property name="horizontalSpacing" >
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>-1</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="3" >
|
||||
<widget class="QCheckBox" name="pf_accept_new_tcp_with_no_syn" >
|
||||
<property name="text" >
|
||||
<string>Generate both 'in' and 'out' rules</string>
|
||||
<string>Accept TCP sessions opened prior to firewall restart</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="3" >
|
||||
<widget class="QCheckBox" name="pf_modulate_state" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Modulate state for all stateful rules (applies only to TCP services)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="3" >
|
||||
<widget class="QCheckBox" name="pf_check_shadowing" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Shadowing happens because a rule is a superset of a subsequent rule and any packets potentially matched by the subsequent rule have already been matched by the prior rule.</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Detect rule shadowing in policy</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="3" >
|
||||
<widget class="QCheckBox" name="pf_ignore_empty_groups" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>If the option is deactivated, compiler treats empty groups as an error and aborts processing the policy. If this option is activated, compiler removes all empty groups from all rule elements. If rule element becomes 'any' after the last empty group has been removed, the whole rule will be ignored. Use this option only if you fully understand how it works!</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Ignore empty groups in rules</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" >
|
||||
<widget class="QLabel" name="textLabel3" >
|
||||
<property name="text" >
|
||||
<string>Optimization:</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" >
|
||||
<widget class="QComboBox" name="pf_optimization" />
|
||||
</item>
|
||||
<item row="4" column="2" >
|
||||
<spacer name="spacer" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>354</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>spacer</zorder>
|
||||
<zorder>pf_optimization</zorder>
|
||||
<zorder>pf_modulate_state</zorder>
|
||||
<zorder>pf_ignore_empty_groups</zorder>
|
||||
<zorder>pf_check_shadowing</zorder>
|
||||
<zorder>textLabel3</zorder>
|
||||
<zorder>pf_accept_new_tcp_with_no_syn</zorder>
|
||||
<zorder>groupBox_2</zorder>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2" >
|
||||
<widget class="QGroupBox" name="groupBox_2" >
|
||||
<property name="title" >
|
||||
<string/>
|
||||
</property>
|
||||
<property name="flat" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_7" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QCheckBox" name="mgmt_ssh" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Always permit ssh access from
|
||||
the management workstation
|
||||
with this address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLineEdit" name="mgmt_addr" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>32767</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" >
|
||||
<spacer>
|
||||
<item row="6" column="1" >
|
||||
<spacer name="verticalSpacer" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>30</height>
|
||||
<width>20</width>
|
||||
<height>11</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="4" >
|
||||
<widget class="QLabel" name="label571" >
|
||||
<property name="text" >
|
||||
<string>There are two ways compiler can generate code for rules in the Global Policy: it can either create two pf rules to control both incoming and outgoing packets for each rule, or it can create only one pf rule for incoming packets and permit all outgoing ones.You get more control over the packets crossing the firewall in the first mode, but generated script is going to be smaller if you choose the second.</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="4" >
|
||||
<widget class="Line" name="hseparator34" >
|
||||
<property name="frameShape" >
|
||||
<enum>QFrame::HLine</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="4" >
|
||||
<widget class="Line" name="hseparator34_2" >
|
||||
<property name="frameShape" >
|
||||
<enum>QFrame::HLine</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1" >
|
||||
<widget class="QLabel" name="textLabel3" >
|
||||
<property name="text" >
|
||||
<string>Optimization:</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="2" >
|
||||
<widget class="QComboBox" name="pf_optimization" />
|
||||
</item>
|
||||
<item row="12" column="3" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>107</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item rowspan="6" row="7" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>150</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="13" column="0" colspan="4" >
|
||||
<widget class="Line" name="line4" >
|
||||
<property name="frameShape" >
|
||||
<enum>QFrame::HLine</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab2" >
|
||||
<attribute name="title" >
|
||||
<string>Scrub rule options</string>
|
||||
<string>Scrub</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
<layout class="QGridLayout" name="gridLayout_5" >
|
||||
<property name="spacing" >
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="3" >
|
||||
<item row="0" column="1" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
@ -412,7 +378,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
@ -420,69 +386,126 @@ with this address:</string>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="2" >
|
||||
<widget class="QCheckBox" name="pf_scrub_use_minttl" >
|
||||
<property name="text" >
|
||||
<string>Enforce Minimum TTL:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" colspan="2" >
|
||||
<widget class="QCheckBox" name="pf_scrub_use_maxmss" >
|
||||
<property name="text" >
|
||||
<string>Enforce Maximum MSS:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3" >
|
||||
<widget class="QSpinBox" name="pf_scrub_maxmss" >
|
||||
<item row="1" column="1" >
|
||||
<widget class="QCheckBox" name="pf_scrub_no_df" >
|
||||
<property name="toolTip" >
|
||||
<string>Enforces a maximum Maximum Segment Size (MSS) in TCP packet headers.</string>
|
||||
<string>Clears the don't fragment bit from the IP packet header.</string>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>536</number>
|
||||
</property>
|
||||
<property name="maximum" >
|
||||
<number>10000</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>1460</number>
|
||||
<property name="text" >
|
||||
<string>Clear DF bit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3" >
|
||||
<widget class="QSpinBox" name="pf_scrub_minttl" >
|
||||
<item row="2" column="1" >
|
||||
<widget class="QCheckBox" name="pf_scrub_random_id" >
|
||||
<property name="toolTip" >
|
||||
<string>Enforces a minimum Time To Live (TTL) in IP packet headers.</string>
|
||||
<string>Replaces the IP identification field of outgoing packets with random values to compensate for operating systems that use predictable values.</string>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum" >
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>1</number>
|
||||
<property name="text" >
|
||||
<string>Use random ID</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="3" >
|
||||
<item rowspan="4" row="3" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>110</height>
|
||||
<width>40</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="5" column="1" colspan="4" >
|
||||
<item row="3" column="1" >
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3" >
|
||||
<item>
|
||||
<widget class="QCheckBox" name="pf_scrub_use_minttl" >
|
||||
<property name="text" >
|
||||
<string>Enforce Minimum TTL:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="pf_scrub_minttl" >
|
||||
<property name="toolTip" >
|
||||
<string>Enforces a minimum Time To Live (TTL) in IP packet headers.</string>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum" >
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>328</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="1" >
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4" >
|
||||
<item>
|
||||
<widget class="QCheckBox" name="pf_scrub_use_maxmss" >
|
||||
<property name="text" >
|
||||
<string>Enforce Maximum MSS:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="pf_scrub_maxmss" >
|
||||
<property name="toolTip" >
|
||||
<string>Enforces a maximum Maximum Segment Size (MSS) in TCP packet headers.</string>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>536</number>
|
||||
</property>
|
||||
<property name="maximum" >
|
||||
<number>10000</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>1460</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="5" column="1" >
|
||||
<widget class="Line" name="hseparator39" >
|
||||
<property name="frameShape" >
|
||||
<enum>QFrame::HLine</enum>
|
||||
@ -495,82 +518,14 @@ with this address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1" colspan="4" >
|
||||
<item row="6" column="1" >
|
||||
<widget class="QCheckBox" name="pf_do_scrub" >
|
||||
<property name="text" >
|
||||
<string>Reassemble fragments</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item rowspan="4" row="3" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="2" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="4" >
|
||||
<widget class="QCheckBox" name="pf_scrub_no_df" >
|
||||
<property name="toolTip" >
|
||||
<string>Clears the don't fragment bit from the IP packet header.</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Clear DF bit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="4" >
|
||||
<widget class="QCheckBox" name="pf_scrub_random_id" >
|
||||
<property name="toolTip" >
|
||||
<string>Replaces the IP identification field of outgoing packets with random values to compensate for operating systems that use predictable values.</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Use random ID</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="4" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="7" column="2" colspan="3" >
|
||||
<item row="7" column="1" >
|
||||
<widget class="QGroupBox" name="buttonGroup20" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
@ -582,16 +537,7 @@ with this address:</string>
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
@ -645,6 +591,22 @@ with this address:</string>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>110</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab3" >
|
||||
@ -652,17 +614,11 @@ with this address:</string>
|
||||
<string>Limits</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
<property name="spacing" >
|
||||
<number>20</number>
|
||||
</property>
|
||||
<item row="1" column="2" >
|
||||
<widget class="QSpinBox" name="pf_limit_frags" >
|
||||
@ -768,7 +724,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>310</width>
|
||||
<height>20</height>
|
||||
@ -848,7 +804,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>99</height>
|
||||
@ -864,7 +820,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
@ -880,7 +836,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
@ -895,17 +851,11 @@ with this address:</string>
|
||||
<string>Timeouts</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
<property name="spacing" >
|
||||
<number>20</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="textLabel2" >
|
||||
@ -926,16 +876,7 @@ with this address:</string>
|
||||
<string>TCP</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
@ -1130,16 +1071,7 @@ with this address:</string>
|
||||
<string>UDP</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
@ -1238,16 +1170,7 @@ with this address:</string>
|
||||
<string>ICMP</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="1" >
|
||||
@ -1317,16 +1240,7 @@ with this address:</string>
|
||||
<string>Other Protocols</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
@ -1431,16 +1345,7 @@ with this address:</string>
|
||||
<string>Fragments</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
@ -1512,7 +1417,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
@ -1526,16 +1431,7 @@ with this address:</string>
|
||||
<string>Adaptive scaling</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="5" >
|
||||
@ -1642,7 +1538,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
@ -1659,158 +1555,16 @@ with this address:</string>
|
||||
<attribute name="title" >
|
||||
<string>Installer</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
<layout class="QGridLayout" name="gridLayout_3" >
|
||||
<property name="spacing" >
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox1_2" >
|
||||
<property name="title" >
|
||||
<string>External install script</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLineEdit" name="installScript" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="textLabel5_2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Policy install script (using built-in installer if this field is blank):</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="textLabel6_2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Command line options for the script:</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="installScriptArgs" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox2_2" >
|
||||
<property name="title" >
|
||||
<string>Built-in installer</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="textLabel1_3" >
|
||||
<property name="text" >
|
||||
<string>Alternative name or address used to communicate with the firewall (also putty session name on Windows)</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="textLabel1_2" >
|
||||
<property name="text" >
|
||||
<string>User name used to authenticate to the firewall (leave this empty if you use putty session):</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<layout class="QGridLayout" name="gridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label556" >
|
||||
<property name="text" >
|
||||
@ -1834,6 +1588,19 @@ with this address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="textLabel1_2" >
|
||||
<property name="text" >
|
||||
<string>User name used to authenticate to the firewall (leave this empty if you use putty session):</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="pf_user" >
|
||||
<property name="sizePolicy" >
|
||||
@ -1844,18 +1611,21 @@ with this address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QLineEdit" name="altAddress" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="textLabel1_3" >
|
||||
<property name="text" >
|
||||
<string>Alternative name or address used to communicate with the firewall (also putty session name on Windows)</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
<widget class="QLineEdit" name="activationCmd" >
|
||||
<item row="2" column="1" >
|
||||
<widget class="QLineEdit" name="altAddress" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
@ -1877,6 +1647,16 @@ with this address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
<widget class="QLineEdit" name="activationCmd" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<item>
|
||||
@ -1897,6 +1677,42 @@ with this address:</string>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2" >
|
||||
<layout class="QHBoxLayout" name="_2" >
|
||||
<item>
|
||||
<widget class="QLabel" name="textLabel1_8" >
|
||||
<property name="text" >
|
||||
<string>Additional command line parameters for scp</string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="scpArgs" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -1904,6 +1720,109 @@ with this address:</string>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox1_2" >
|
||||
<property name="title" >
|
||||
<string>External install script</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2" >
|
||||
<item row="0" column="0" >
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" >
|
||||
<item>
|
||||
<widget class="QLabel" name="textLabel5_2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Policy install script (using built-in installer if this field is blank):</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="installScript" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" >
|
||||
<item>
|
||||
<widget class="QLabel" name="textLabel6_2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Command line options for the script:</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="installScriptArgs" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab6" >
|
||||
@ -1911,17 +1830,11 @@ with this address:</string>
|
||||
<string>Prolog/Epilog</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
<property name="spacing" >
|
||||
<number>20</number>
|
||||
</property>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QGroupBox" name="frame147" >
|
||||
@ -1929,16 +1842,7 @@ with this address:</string>
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="1" >
|
||||
@ -1956,7 +1860,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
@ -1996,16 +1900,7 @@ with this address:</string>
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="3" column="3" >
|
||||
@ -2076,7 +1971,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
@ -2092,7 +1987,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>410</width>
|
||||
<height>20</height>
|
||||
@ -2110,17 +2005,11 @@ with this address:</string>
|
||||
<string>Logging</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
<property name="spacing" >
|
||||
<number>20</number>
|
||||
</property>
|
||||
<item row="0" column="2" >
|
||||
<spacer>
|
||||
@ -2130,7 +2019,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
@ -2159,7 +2048,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>70</width>
|
||||
<height>20</height>
|
||||
@ -2175,7 +2064,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>130</width>
|
||||
<height>20</height>
|
||||
@ -2194,7 +2083,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>320</height>
|
||||
@ -2213,20 +2102,14 @@ with this address:</string>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab8" >
|
||||
<attribute name="title" >
|
||||
<string>Script Options</string>
|
||||
<string>Script</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
<property name="spacing" >
|
||||
<number>20</number>
|
||||
</property>
|
||||
<item rowspan="3" row="2" column="0" >
|
||||
<spacer>
|
||||
@ -2236,7 +2119,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>70</height>
|
||||
@ -2286,7 +2169,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>230</height>
|
||||
@ -2302,7 +2185,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
@ -2312,11 +2195,14 @@ with this address:</string>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab" >
|
||||
<widget class="QWidget" name="tab9" >
|
||||
<attribute name="title" >
|
||||
<string>IPv6</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="spacing" >
|
||||
<number>20</number>
|
||||
</property>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="label" >
|
||||
<property name="text" >
|
||||
@ -2329,7 +2215,7 @@ with this address:</string>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
@ -2356,7 +2242,7 @@ with this address:</string>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
@ -2385,7 +2271,7 @@ with this address:</string>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>331</width>
|
||||
<height>27</height>
|
||||
@ -2434,13 +2320,6 @@ with this address:</string>
|
||||
<tabstop>outputFileName</tabstop>
|
||||
<tabstop>pf_in_out_code</tabstop>
|
||||
<tabstop>pf_pass_all_out</tabstop>
|
||||
<tabstop>pf_accept_new_tcp_with_no_syn</tabstop>
|
||||
<tabstop>pf_modulate_state</tabstop>
|
||||
<tabstop>pf_check_shadowing</tabstop>
|
||||
<tabstop>pf_ignore_empty_groups</tabstop>
|
||||
<tabstop>pf_optimization</tabstop>
|
||||
<tabstop>mgmt_ssh</tabstop>
|
||||
<tabstop>mgmt_addr</tabstop>
|
||||
<tabstop>buttonOk</tabstop>
|
||||
<tabstop>buttonCancel</tabstop>
|
||||
<tabstop>pf_scrub_no_df</tabstop>
|
||||
|
@ -111,7 +111,7 @@ pixAdvancedDialog::pixAdvancedDialog(QWidget*, FWObject *o)//(parent)
|
||||
connect(fwb_pix_proc, SIGNAL(bytesWritten(qint64)), this, SLOT(allXMLSent() ) );
|
||||
|
||||
compilerPath = compiler.c_str();
|
||||
argumentList << "-f" << "-" << "-i" << fw->getName().c_str();
|
||||
argumentList << "-f" << "-" << "-I" << fw->getName().c_str();
|
||||
|
||||
string vers="version_"+obj->getStr("version");
|
||||
string platform = obj->getStr("platform"); // could be 'pix' or 'fwsm'
|
||||
@ -243,168 +243,264 @@ pixAdvancedDialog::pixAdvancedDialog(QWidget*, FWObject *o)//(parent)
|
||||
m_dialog->pix_generate_out_acl->hide();
|
||||
|
||||
m_dialog->tabWidget->setTabEnabled(8,false); //Disable tab
|
||||
data.registerOption(m_dialog->ipv4before_2, fwoptions, "ipv4_6_order", QStringList() << "IPv4 before IPv6" <<"ipv4_first" << "IPv6 before IPv4" << "ipv6_first" );
|
||||
data.registerOption(m_dialog->ipv4before_2, fwoptions, "ipv4_6_order", QStringList() << "IPv4 before IPv6" <<"ipv4_first" << "IPv6 before IPv4" << "ipv6_first");
|
||||
|
||||
|
||||
data.registerOption( m_dialog->outputFileName , fwoptions,
|
||||
"output_file" );
|
||||
data.registerOption( m_dialog->outputFileName, fwoptions,
|
||||
"output_file");
|
||||
|
||||
data.registerOption( m_dialog->pix_assume_fw_part_of_any , fwoptions,
|
||||
"pix_assume_fw_part_of_any" );
|
||||
data.registerOption( m_dialog->pix_assume_fw_part_of_any, fwoptions,
|
||||
"pix_assume_fw_part_of_any");
|
||||
|
||||
data.registerOption( m_dialog->pix_replace_natted_objects , fwoptions,
|
||||
"pix_replace_natted_objects" );
|
||||
data.registerOption( m_dialog->pix_replace_natted_objects, fwoptions,
|
||||
"pix_replace_natted_objects");
|
||||
|
||||
data.registerOption( m_dialog->pix_emulate_out_acl , fwoptions,
|
||||
"pix_emulate_out_acl" );
|
||||
data.registerOption( m_dialog->pix_emulate_out_acl, fwoptions,
|
||||
"pix_emulate_out_acl");
|
||||
|
||||
data.registerOption( m_dialog->pix_generate_out_acl , fwoptions,
|
||||
"pix_generate_out_acl" );
|
||||
data.registerOption( m_dialog->pix_generate_out_acl, fwoptions,
|
||||
"pix_generate_out_acl");
|
||||
|
||||
|
||||
data.registerOption( m_dialog->pix_acl_basic , fwoptions,
|
||||
"pix_acl_basic" );
|
||||
data.registerOption( m_dialog->pix_acl_basic, fwoptions,
|
||||
"pix_acl_basic");
|
||||
|
||||
/*
|
||||
data.registerOption( m_dialog->pix_acl_alwaysNew , fwoptions,
|
||||
"pix_acl_always_new" );
|
||||
data.registerOption( m_dialog->pix_acl_alwaysNew, fwoptions,
|
||||
"pix_acl_always_new");
|
||||
*/
|
||||
|
||||
data.registerOption( m_dialog->pix_acl_no_clear , fwoptions,
|
||||
"pix_acl_no_clear" );
|
||||
data.registerOption( m_dialog->pix_acl_no_clear, fwoptions,
|
||||
"pix_acl_no_clear");
|
||||
|
||||
data.registerOption( m_dialog->pix_acl_substitution , fwoptions,
|
||||
"pix_acl_substitution" );
|
||||
data.registerOption( m_dialog->pix_acl_substitution, fwoptions,
|
||||
"pix_acl_substitution");
|
||||
|
||||
data.registerOption( m_dialog->pix_acl_temp_addr , fwoptions,
|
||||
"pix_acl_temp_addr" );
|
||||
data.registerOption( m_dialog->pix_acl_temp_addr, fwoptions,
|
||||
"pix_acl_temp_addr");
|
||||
|
||||
|
||||
data.registerOption( m_dialog->pix_include_comments , fwoptions,
|
||||
"pix_include_comments" );
|
||||
data.registerOption( m_dialog->pix_include_comments, fwoptions,
|
||||
"pix_include_comments");
|
||||
|
||||
data.registerOption( m_dialog->pix_use_acl_remarks , fwoptions,
|
||||
"pix_use_acl_remarks" );
|
||||
data.registerOption( m_dialog->pix_use_acl_remarks, fwoptions,
|
||||
"pix_use_acl_remarks");
|
||||
|
||||
data.registerOption( m_dialog->pix_regroup_commands , fwoptions,
|
||||
"pix_regroup_commands" );
|
||||
data.registerOption( m_dialog->pix_regroup_commands, fwoptions,
|
||||
"pix_regroup_commands");
|
||||
|
||||
data.registerOption( m_dialog->pix_use_manual_commit , fwoptions,
|
||||
"pix_use_manual_commit" );
|
||||
data.registerOption( m_dialog->pix_use_manual_commit, fwoptions,
|
||||
"pix_use_manual_commit");
|
||||
|
||||
m_dialog->pix_use_manual_commit->setEnabled(platform=="fwsm");
|
||||
/*
|
||||
data.registerOption( m_dialog->pix_add_clear_statements , fwoptions,
|
||||
"pix_add_clear_statements" );
|
||||
data.registerOption( m_dialog->pix_add_clear_statements, fwoptions,
|
||||
"pix_add_clear_statements");
|
||||
*/
|
||||
|
||||
data.registerOption( m_dialog->pix_optimize_default_nat , fwoptions,
|
||||
"pix_optimize_default_nat" );
|
||||
data.registerOption( m_dialog->pix_optimize_default_nat, fwoptions,
|
||||
"pix_optimize_default_nat");
|
||||
|
||||
data.registerOption( m_dialog->pix_check_shadowing , fwoptions,
|
||||
"check_shading" );
|
||||
data.registerOption( m_dialog->pix_check_shadowing, fwoptions,
|
||||
"check_shading");
|
||||
|
||||
data.registerOption( m_dialog->pix_ignore_empty_groups , fwoptions,
|
||||
"ignore_empty_groups" );
|
||||
data.registerOption( m_dialog->pix_ignore_empty_groups, fwoptions,
|
||||
"ignore_empty_groups");
|
||||
|
||||
|
||||
data.registerOption( m_dialog->pix_check_duplicate_nat , fwoptions,
|
||||
"pix_check_duplicate_nat" );
|
||||
data.registerOption( m_dialog->pix_check_duplicate_nat, fwoptions,
|
||||
"pix_check_duplicate_nat");
|
||||
|
||||
data.registerOption( m_dialog->pix_check_overlapping_global_pools , fwoptions,
|
||||
"pix_check_overlapping_global_pools" );
|
||||
data.registerOption( m_dialog->pix_check_overlapping_global_pools, fwoptions,
|
||||
"pix_check_overlapping_global_pools");
|
||||
|
||||
data.registerOption( m_dialog->pix_check_overlapping_statics , fwoptions,
|
||||
"pix_check_overlapping_statics" );
|
||||
data.registerOption( m_dialog->pix_check_overlapping_statics, fwoptions,
|
||||
"pix_check_overlapping_statics");
|
||||
|
||||
data.registerOption( m_dialog->pix_check_overlapping_global_statics , fwoptions,
|
||||
"pix_check_overlapping_global_statics" );
|
||||
data.registerOption( m_dialog->pix_check_overlapping_global_statics, fwoptions,
|
||||
"pix_check_overlapping_global_statics");
|
||||
|
||||
data.registerOption( m_dialog->mgmt_ssh , fwoptions, "mgmt_ssh" );
|
||||
data.registerOption( m_dialog->mgmt_addr , fwoptions, "mgmt_addr" );
|
||||
data.registerOption( m_dialog->mgmt_ssh, fwoptions, "mgmt_ssh");
|
||||
data.registerOption( m_dialog->mgmt_addr, fwoptions, "mgmt_addr");
|
||||
|
||||
/* page Installer */
|
||||
|
||||
data.registerOption( m_dialog->user ,fwoptions, "admUser" );
|
||||
data.registerOption( m_dialog->altAddress ,fwoptions, "altAddress" );
|
||||
data.registerOption( m_dialog->sshArgs ,fwoptions, "sshArgs" );
|
||||
data.registerOption( m_dialog->user,fwoptions, "admUser");
|
||||
data.registerOption( m_dialog->altAddress,fwoptions, "altAddress");
|
||||
data.registerOption( m_dialog->sshArgs, fwoptions, "sshArgs");
|
||||
data.registerOption( m_dialog->scpArgs, fwoptions, "scpArgs");
|
||||
|
||||
PolicyInstallScript *pis = mgmt->getPolicyInstallScript();
|
||||
|
||||
m_dialog->installScript->setText( pis->getCommand().c_str() );
|
||||
m_dialog->installScriptArgs->setText( pis->getArguments().c_str() );
|
||||
m_dialog->installScript->setText( pis->getCommand().c_str());
|
||||
m_dialog->installScriptArgs->setText( pis->getArguments().c_str());
|
||||
|
||||
|
||||
/* page "Prolog/Epilog" */
|
||||
data.registerOption( m_dialog->pix_prolog_script , fwoptions,
|
||||
"pix_prolog_script" );
|
||||
data.registerOption( m_dialog->pix_prolog_script, fwoptions,
|
||||
"pix_prolog_script");
|
||||
|
||||
data.registerOption( m_dialog->pix_epilog_script , fwoptions,
|
||||
"pix_epilog_script" );
|
||||
data.registerOption( m_dialog->pix_epilog_script, fwoptions,
|
||||
"pix_epilog_script");
|
||||
|
||||
/* page "Timeouts" */
|
||||
data.registerOption( m_dialog->xlate_hh , fwoptions, "xlate_hh" );
|
||||
data.registerOption( m_dialog->xlate_mm , fwoptions, "xlate_mm" );
|
||||
data.registerOption( m_dialog->xlate_ss , fwoptions, "xlate_ss" );
|
||||
data.registerOption( m_dialog->xlate_hh, fwoptions, "xlate_hh");
|
||||
data.registerOption( m_dialog->xlate_mm, fwoptions, "xlate_mm");
|
||||
data.registerOption( m_dialog->xlate_ss, fwoptions, "xlate_ss");
|
||||
|
||||
data.registerOption( m_dialog->conn_hh , fwoptions, "conn_hh" );
|
||||
data.registerOption( m_dialog->conn_mm , fwoptions, "conn_mm" );
|
||||
data.registerOption( m_dialog->conn_ss , fwoptions, "conn_ss" );
|
||||
data.registerOption( m_dialog->conn_hh, fwoptions, "conn_hh");
|
||||
data.registerOption( m_dialog->conn_mm, fwoptions, "conn_mm");
|
||||
data.registerOption( m_dialog->conn_ss, fwoptions, "conn_ss");
|
||||
|
||||
data.registerOption( m_dialog->udp_hh , fwoptions, "udp_hh" );
|
||||
data.registerOption( m_dialog->udp_mm , fwoptions, "udp_mm" );
|
||||
data.registerOption( m_dialog->udp_ss , fwoptions, "udp_ss" );
|
||||
data.registerOption( m_dialog->udp_hh, fwoptions, "udp_hh");
|
||||
data.registerOption( m_dialog->udp_mm, fwoptions, "udp_mm");
|
||||
data.registerOption( m_dialog->udp_ss, fwoptions, "udp_ss");
|
||||
|
||||
data.registerOption( m_dialog->rpc_hh , fwoptions, "rpc_hh" );
|
||||
data.registerOption( m_dialog->rpc_mm , fwoptions, "rpc_mm" );
|
||||
data.registerOption( m_dialog->rpc_ss , fwoptions, "rpc_ss" );
|
||||
data.registerOption( m_dialog->rpc_hh, fwoptions, "rpc_hh");
|
||||
data.registerOption( m_dialog->rpc_mm, fwoptions, "rpc_mm");
|
||||
data.registerOption( m_dialog->rpc_ss, fwoptions, "rpc_ss");
|
||||
|
||||
data.registerOption( m_dialog->h323_hh , fwoptions, "h323_hh" );
|
||||
data.registerOption( m_dialog->h323_mm , fwoptions, "h323_mm" );
|
||||
data.registerOption( m_dialog->h323_ss , fwoptions, "h323_ss" );
|
||||
data.registerOption( m_dialog->h323_hh, fwoptions, "h323_hh");
|
||||
data.registerOption( m_dialog->h323_mm, fwoptions, "h323_mm");
|
||||
data.registerOption( m_dialog->h323_ss, fwoptions, "h323_ss");
|
||||
|
||||
data.registerOption( m_dialog->sip_hh , fwoptions, "sip_hh" );
|
||||
data.registerOption( m_dialog->sip_mm , fwoptions, "sip_mm" );
|
||||
data.registerOption( m_dialog->sip_ss , fwoptions, "sip_ss" );
|
||||
data.registerOption( m_dialog->sip_hh, fwoptions, "sip_hh");
|
||||
data.registerOption( m_dialog->sip_mm, fwoptions, "sip_mm");
|
||||
data.registerOption( m_dialog->sip_ss, fwoptions, "sip_ss");
|
||||
|
||||
data.registerOption( m_dialog->sip_media_hh , fwoptions, "sip_media_hh" );
|
||||
data.registerOption( m_dialog->sip_media_mm , fwoptions, "sip_media_mm" );
|
||||
data.registerOption( m_dialog->sip_media_ss , fwoptions, "sip_media_ss" );
|
||||
data.registerOption( m_dialog->sip_media_hh, fwoptions, "sip_media_hh");
|
||||
data.registerOption( m_dialog->sip_media_mm, fwoptions, "sip_media_mm");
|
||||
data.registerOption( m_dialog->sip_media_ss, fwoptions, "sip_media_ss");
|
||||
|
||||
data.registerOption( m_dialog->half_closed_hh , fwoptions, "half-closed_hh");
|
||||
data.registerOption( m_dialog->half_closed_mm , fwoptions, "half-closed_mm");
|
||||
data.registerOption( m_dialog->half_closed_ss , fwoptions, "half-closed_ss");
|
||||
data.registerOption( m_dialog->half_closed_hh, fwoptions, "half-closed_hh");
|
||||
data.registerOption( m_dialog->half_closed_mm, fwoptions, "half-closed_mm");
|
||||
data.registerOption( m_dialog->half_closed_ss, fwoptions, "half-closed_ss");
|
||||
|
||||
data.registerOption( m_dialog->uauth_hh , fwoptions, "uauth_hh" );
|
||||
data.registerOption( m_dialog->uauth_mm , fwoptions, "uauth_mm" );
|
||||
data.registerOption( m_dialog->uauth_ss , fwoptions, "uauth_ss" );
|
||||
data.registerOption( m_dialog->uauth_abs , fwoptions, "uauth_abs" );
|
||||
data.registerOption( m_dialog->uauth_inact , fwoptions, "uauth_inact" );
|
||||
data.registerOption( m_dialog->uauth_hh, fwoptions, "uauth_hh");
|
||||
data.registerOption( m_dialog->uauth_mm, fwoptions, "uauth_mm");
|
||||
data.registerOption( m_dialog->uauth_ss, fwoptions, "uauth_ss");
|
||||
data.registerOption( m_dialog->uauth_abs, fwoptions, "uauth_abs");
|
||||
data.registerOption( m_dialog->uauth_inact, fwoptions, "uauth_inact");
|
||||
|
||||
data.registerOption( m_dialog->telnet_timeout , fwoptions, "pix_telnet_timeout");
|
||||
data.registerOption( m_dialog->ssh_timeout , fwoptions, "pix_ssh_timeout" );
|
||||
data.registerOption( m_dialog->telnet_timeout, fwoptions, "pix_telnet_timeout");
|
||||
data.registerOption( m_dialog->ssh_timeout, fwoptions, "pix_ssh_timeout");
|
||||
|
||||
/* page Fixups */
|
||||
|
||||
allFixups.push_back(fixupControl( m_dialog->pix_ctiqbe_switch, m_dialog->pix_ctiqbe_port, NULL, NULL, "ctiqbe_fixup" , "ctiqbe" , 0));
|
||||
allFixups.push_back(fixupControl( m_dialog->pix_dns_switch, m_dialog->pix_dns_max_length, NULL, NULL, "dns_fixup" , "dns" , 1));
|
||||
allFixups.push_back(fixupControl( m_dialog->pix_espike_switch, NULL, NULL, NULL, "espike_fixup" , "esp-ike" , 2));
|
||||
allFixups.push_back(fixupControl( m_dialog->pix_ftp_switch, m_dialog->pix_ftp_port, NULL, m_dialog->pix_ftp_strict, "ftp_fixup" , "ftp" , 3));
|
||||
allFixups.push_back(fixupControl( m_dialog->pix_h323h225_switch, m_dialog->pix_h323h225_port1, m_dialog->pix_h323h225_port2, NULL, "h323_h225_fixup" , "h323 h225" , 4));
|
||||
allFixups.push_back(fixupControl( m_dialog->pix_h323ras_switch, m_dialog->pix_h323ras_port1, m_dialog->pix_h323ras_port2, NULL, "h323_ras_fixup" , "h323 ras" , 5));
|
||||
allFixups.push_back(fixupControl( m_dialog->pix_http_switch, m_dialog->pix_http_port1, m_dialog->pix_http_port2, NULL, "http_fixup" , "http" , 6));
|
||||
allFixups.push_back(fixupControl( m_dialog->pix_icmperror_switch, NULL, NULL, NULL, "icmp_error_fixup", "icmp error", 7));
|
||||
allFixups.push_back(fixupControl( m_dialog->pix_ils_switch, m_dialog->pix_ils_port1, m_dialog->pix_ils_port2, NULL, "ils_fixup" , "ils" , 8));
|
||||
allFixups.push_back(fixupControl( m_dialog->pix_mgcp_switch, m_dialog->pix_mgcp_gateway_port, m_dialog->pix_mgcp_call_agent_port, NULL, "mgcp_fixup" , "mgcp" , 9));
|
||||
allFixups.push_back(fixupControl( m_dialog->pix_pptp_switch, m_dialog->pix_pptp_port, NULL, NULL, "pptp_fixup" , "pptp" , 10));
|
||||
allFixups.push_back(fixupControl( m_dialog->pix_rsh_switch, m_dialog->pix_rsh_port1, NULL, NULL, "rsh_fixup" , "rsh" , 11));
|
||||
allFixups.push_back(fixupControl( m_dialog->pix_rtsp_switch, m_dialog->pix_rtsp_port, NULL, NULL, "rtsp_fixup" , "rtsp" , 12));
|
||||
allFixups.push_back(fixupControl( m_dialog->pix_sip_switch, m_dialog->pix_sip_port1, m_dialog->pix_sip_port2, NULL, "sip_fixup" , "sip" , 13));
|
||||
allFixups.push_back(fixupControl( m_dialog->pix_sipudp_switch, m_dialog->pix_sip_udp_port1, NULL, NULL, "sip_udp_fixup" , "sip udp" , 14));
|
||||
allFixups.push_back(fixupControl( m_dialog->pix_skinny_switch, m_dialog->pix_skinny_port1, m_dialog->pix_skinny_port2, NULL, "skinny_fixup" , "skinny" , 15));
|
||||
allFixups.push_back(fixupControl( m_dialog->pix_smtp_switch, m_dialog->pix_smtp_port1, m_dialog->pix_smtp_port2, NULL, "smtp_fixup" , "smtp" , 16));
|
||||
allFixups.push_back(fixupControl( m_dialog->pix_sqlnet_switch, m_dialog->pix_sqlnet_port1, m_dialog->pix_sqlnet_port2, NULL, "sqlnet_fixup" , "sqlnet" , 17));
|
||||
allFixups.push_back(fixupControl( m_dialog->pix_tftp_switch, m_dialog->pix_tftp_port, NULL, NULL, "tftp_fixup" , "tftp" , 18));
|
||||
allFixups.push_back(fixupControl(
|
||||
m_dialog->pix_ctiqbe_switch,
|
||||
m_dialog->pix_ctiqbe_port,
|
||||
NULL,
|
||||
NULL,
|
||||
"ctiqbe_fixup", "ctiqbe", 0));
|
||||
allFixups.push_back(fixupControl(
|
||||
m_dialog->pix_dns_switch,
|
||||
m_dialog->pix_dns_max_length,
|
||||
NULL,
|
||||
NULL,
|
||||
"dns_fixup", "dns", 1));
|
||||
allFixups.push_back(fixupControl(
|
||||
m_dialog->pix_espike_switch,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"espike_fixup", "esp-ike", 2));
|
||||
allFixups.push_back(fixupControl(
|
||||
m_dialog->pix_ftp_switch,
|
||||
m_dialog->pix_ftp_port,
|
||||
NULL,
|
||||
m_dialog->pix_ftp_strict,
|
||||
"ftp_fixup", "ftp", 3));
|
||||
allFixups.push_back(fixupControl(
|
||||
m_dialog->pix_h323h225_switch,
|
||||
m_dialog->pix_h323h225_port1,
|
||||
m_dialog->pix_h323h225_port2,
|
||||
NULL,
|
||||
"h323_h225_fixup", "h323 h225", 4));
|
||||
allFixups.push_back(fixupControl(
|
||||
m_dialog->pix_h323ras_switch,
|
||||
m_dialog->pix_h323ras_port1,
|
||||
m_dialog->pix_h323ras_port2,
|
||||
NULL,
|
||||
"h323_ras_fixup", "h323 ras", 5));
|
||||
allFixups.push_back(fixupControl(
|
||||
m_dialog->pix_http_switch,
|
||||
m_dialog->pix_http_port1,
|
||||
m_dialog->pix_http_port2,
|
||||
NULL,
|
||||
"http_fixup", "http", 6));
|
||||
allFixups.push_back(fixupControl(
|
||||
m_dialog->pix_icmperror_switch,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"icmp_error_fixup", "icmp error", 7));
|
||||
allFixups.push_back(fixupControl(
|
||||
m_dialog->pix_ils_switch,
|
||||
m_dialog->pix_ils_port1,
|
||||
m_dialog->pix_ils_port2,
|
||||
NULL,
|
||||
"ils_fixup", "ils", 8));
|
||||
allFixups.push_back(fixupControl(
|
||||
m_dialog->pix_mgcp_switch,
|
||||
m_dialog->pix_mgcp_gateway_port,
|
||||
m_dialog->pix_mgcp_call_agent_port,
|
||||
NULL,
|
||||
"mgcp_fixup", "mgcp", 9));
|
||||
allFixups.push_back(fixupControl(
|
||||
m_dialog->pix_pptp_switch,
|
||||
m_dialog->pix_pptp_port,
|
||||
NULL,
|
||||
NULL,
|
||||
"pptp_fixup", "pptp", 10));
|
||||
allFixups.push_back(fixupControl(
|
||||
m_dialog->pix_rsh_switch,
|
||||
m_dialog->pix_rsh_port1,
|
||||
NULL,
|
||||
NULL,
|
||||
"rsh_fixup", "rsh", 11));
|
||||
allFixups.push_back(fixupControl(
|
||||
m_dialog->pix_rtsp_switch,
|
||||
m_dialog->pix_rtsp_port,
|
||||
NULL,
|
||||
NULL,
|
||||
"rtsp_fixup", "rtsp", 12));
|
||||
allFixups.push_back(fixupControl(
|
||||
m_dialog->pix_sip_switch,
|
||||
m_dialog->pix_sip_port1,
|
||||
m_dialog->pix_sip_port2,
|
||||
NULL,
|
||||
"sip_fixup", "sip", 13));
|
||||
allFixups.push_back(fixupControl(
|
||||
m_dialog->pix_sipudp_switch,
|
||||
m_dialog->pix_sip_udp_port1,
|
||||
NULL,
|
||||
NULL,
|
||||
"sip_udp_fixup", "sip udp", 14));
|
||||
allFixups.push_back(fixupControl(
|
||||
m_dialog->pix_skinny_switch,
|
||||
m_dialog->pix_skinny_port1,
|
||||
m_dialog->pix_skinny_port2,
|
||||
NULL,
|
||||
"skinny_fixup", "skinny", 15));
|
||||
allFixups.push_back(fixupControl(
|
||||
m_dialog->pix_smtp_switch,
|
||||
m_dialog->pix_smtp_port1,
|
||||
m_dialog->pix_smtp_port2,
|
||||
NULL,
|
||||
"smtp_fixup", "smtp", 16));
|
||||
allFixups.push_back(fixupControl(
|
||||
m_dialog->pix_sqlnet_switch,
|
||||
m_dialog->pix_sqlnet_port1,
|
||||
m_dialog->pix_sqlnet_port2,
|
||||
NULL,
|
||||
"sqlnet_fixup", "sqlnet", 17));
|
||||
allFixups.push_back(fixupControl(
|
||||
m_dialog->pix_tftp_switch,
|
||||
m_dialog->pix_tftp_port,
|
||||
NULL,
|
||||
NULL,
|
||||
"tftp_fixup", "tftp", 18));
|
||||
|
||||
string lst=Resources::platform_res[platform]->getResourceStr(
|
||||
"/FWBuilderResources/Target/options/"+vers+"/fixups/list");
|
||||
@ -413,21 +509,25 @@ pixAdvancedDialog::pixAdvancedDialog(QWidget*, FWObject *o)//(parent)
|
||||
qDebug("pixAdvancedDialog::pixAdvancedDialog lst = %s",lst.c_str());
|
||||
|
||||
|
||||
for (list<fixupControl>::iterator fi=allFixups.begin(); fi!=allFixups.end(); fi++)
|
||||
for (list<fixupControl>::iterator fi=allFixups.begin();
|
||||
fi!=allFixups.end(); fi++)
|
||||
{
|
||||
qDebug("pixAdvancedDialog::pixAdvancedDialog fwo = %s",fi->fwoption.toAscii().constData());
|
||||
if (fwbdebug)
|
||||
qDebug("pixAdvancedDialog::pixAdvancedDialog fwopt = %s",
|
||||
fi->fwoption.toAscii().constData());
|
||||
|
||||
if (fi->switch_widget!=NULL) connect( fi->switch_widget, SIGNAL(activated(int)),
|
||||
this, SLOT(fixupCmdChanged()) );
|
||||
if (fi->switch_widget!=NULL)
|
||||
connect( fi->switch_widget, SIGNAL(activated(int)),
|
||||
this, SLOT(fixupCmdChanged()));
|
||||
|
||||
if (fi->arg1!=NULL) connect( fi->arg1, SIGNAL(valueChanged(int)),
|
||||
this, SLOT(fixupCmdChanged()) );
|
||||
this, SLOT(fixupCmdChanged()));
|
||||
|
||||
if (fi->arg2!=NULL) connect( fi->arg2, SIGNAL(valueChanged(int)),
|
||||
this, SLOT(fixupCmdChanged()) );
|
||||
this, SLOT(fixupCmdChanged()));
|
||||
|
||||
if (fi->arg3!=NULL) connect( fi->arg3, SIGNAL(clicked()),
|
||||
this, SLOT(fixupCmdChanged()) );
|
||||
this, SLOT(fixupCmdChanged()));
|
||||
|
||||
string::size_type i,j;
|
||||
i=0;
|
||||
@ -443,7 +543,7 @@ pixAdvancedDialog::pixAdvancedDialog(QWidget*, FWObject *o)//(parent)
|
||||
if (!present)
|
||||
{
|
||||
fi->active=false;
|
||||
m_dialog->fixup_notebook->setTabEnabled( fi->page, false );
|
||||
m_dialog->fixup_notebook->setTabEnabled( fi->page, false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -451,11 +551,12 @@ pixAdvancedDialog::pixAdvancedDialog(QWidget*, FWObject *o)//(parent)
|
||||
|
||||
m_dialog->emblem_log_format->setEnabled(
|
||||
Resources::platform_res[platform]->getResourceBool(
|
||||
"/FWBuilderResources/Target/options/"+vers+"/pix_emblem_log_format") );
|
||||
"/FWBuilderResources/Target/options/"+vers+"/pix_emblem_log_format"));
|
||||
|
||||
|
||||
syslogDeviceIdSupported= (Resources::platform_res[platform]->getResourceBool(
|
||||
"/FWBuilderResources/Target/options/"+vers+"/pix_syslog_device_id_supported") );
|
||||
syslogDeviceIdSupported=(Resources::platform_res[platform]->getResourceBool(
|
||||
"/FWBuilderResources/Target/options/"+
|
||||
vers+"/pix_syslog_device_id_supported"));
|
||||
|
||||
m_dialog->syslog_device_id_hostname->setEnabled(syslogDeviceIdSupported);
|
||||
m_dialog->syslog_device_id_interface->setEnabled(syslogDeviceIdSupported);
|
||||
@ -464,29 +565,30 @@ pixAdvancedDialog::pixAdvancedDialog(QWidget*, FWObject *o)//(parent)
|
||||
m_dialog->syslog_device_id_string_val->setEnabled(syslogDeviceIdSupported);
|
||||
|
||||
|
||||
data.registerOption( m_dialog->syslog_host, fwoptions, "pix_syslog_host");
|
||||
data.registerOption( m_dialog->syslog_queue_size, fwoptions, "pix_syslog_queue_size" );
|
||||
data.registerOption( m_dialog->syslog_host, fwoptions, "pix_syslog_host");
|
||||
data.registerOption( m_dialog->syslog_queue_size, fwoptions, "pix_syslog_queue_size");
|
||||
|
||||
m_dialog->syslog_facility->clear();
|
||||
m_dialog->syslog_facility->addItems( syslogFacilities );
|
||||
data.registerOption( m_dialog->syslog_facility, fwoptions,
|
||||
m_dialog->syslog_facility->addItems( syslogFacilities);
|
||||
data.registerOption( m_dialog->syslog_facility, fwoptions,
|
||||
"pix_syslog_facility", syslogFacilityMapping);
|
||||
|
||||
m_dialog->logging_trap_level->clear();
|
||||
m_dialog->logging_trap_level->addItems(logLevels);
|
||||
|
||||
data.registerOption( m_dialog->logging_trap_level, fwoptions,
|
||||
data.registerOption( m_dialog->logging_trap_level, fwoptions,
|
||||
"pix_logging_trap_level", logLevelMapping);
|
||||
|
||||
|
||||
data.registerOption( m_dialog->emblem_log_format, fwoptions, "pix_emblem_log_format");
|
||||
data.registerOption( m_dialog->emblem_log_format, fwoptions,
|
||||
"pix_emblem_log_format");
|
||||
|
||||
|
||||
|
||||
QStringList interfaces;
|
||||
list<FWObject*> l2=obj->getByType(Interface::TYPENAME);
|
||||
for (list<FWObject*>::iterator i=l2.begin(); i!=l2.end(); ++i)
|
||||
interfaces.push_back( (Interface::cast(*i))->getLabel().c_str() );
|
||||
interfaces.push_back( (Interface::cast(*i))->getLabel().c_str());
|
||||
|
||||
m_dialog->syslog_device_id_interface_val->addItems(interfaces);
|
||||
|
||||
@ -508,16 +610,19 @@ pixAdvancedDialog::pixAdvancedDialog(QWidget*, FWObject *o)//(parent)
|
||||
}
|
||||
}
|
||||
|
||||
data.registerOption( m_dialog->logging_timestamp, fwoptions, "pix_logging_timestamp");
|
||||
data.registerOption( m_dialog->logging_timestamp, fwoptions,
|
||||
"pix_logging_timestamp");
|
||||
|
||||
data.registerOption( m_dialog->logging_buffered, fwoptions, "pix_logging_buffered");
|
||||
data.registerOption( m_dialog->logging_buffered, fwoptions,
|
||||
"pix_logging_buffered");
|
||||
|
||||
m_dialog->logging_buffered_level->clear();
|
||||
m_dialog->logging_buffered_level->addItems(logLevels);
|
||||
data.registerOption( m_dialog->logging_buffered_level, fwoptions,
|
||||
"pix_logging_buffered_level", logLevelMapping);
|
||||
|
||||
data.registerOption( m_dialog->logging_console, fwoptions, "pix_logging_console");
|
||||
data.registerOption( m_dialog->logging_console, fwoptions,
|
||||
"pix_logging_console");
|
||||
|
||||
m_dialog->logging_console_level->clear();
|
||||
m_dialog->logging_console_level->addItems(logLevels);
|
||||
@ -529,25 +634,25 @@ pixAdvancedDialog::pixAdvancedDialog(QWidget*, FWObject *o)//(parent)
|
||||
|
||||
m_dialog->fragguard->setEnabled(
|
||||
Resources::platform_res[platform]->getResourceBool(
|
||||
"/FWBuilderResources/Target/options/"+vers+"/pix_security_fragguard_supported") );
|
||||
"/FWBuilderResources/Target/options/"+vers+"/pix_security_fragguard_supported"));
|
||||
|
||||
m_dialog->route_dnat->setEnabled(
|
||||
Resources::platform_res[platform]->getResourceBool(
|
||||
"/FWBuilderResources/Target/options/"+vers+"/pix_route_dnat_supported") );
|
||||
"/FWBuilderResources/Target/options/"+vers+"/pix_route_dnat_supported"));
|
||||
|
||||
data.registerOption( m_dialog->fragguard, fwoptions, "pix_fragguard" );
|
||||
data.registerOption( m_dialog->route_dnat, fwoptions, "pix_route_dnat" );
|
||||
data.registerOption( m_dialog->fragguard, fwoptions, "pix_fragguard");
|
||||
data.registerOption( m_dialog->route_dnat, fwoptions, "pix_route_dnat");
|
||||
|
||||
data.registerOption( m_dialog->resetinbound, fwoptions, "pix_resetinbound" );
|
||||
data.registerOption( m_dialog->resetoutside, fwoptions, "pix_resetoutside" );
|
||||
data.registerOption( m_dialog->resetinbound, fwoptions, "pix_resetinbound");
|
||||
data.registerOption( m_dialog->resetoutside, fwoptions, "pix_resetoutside");
|
||||
|
||||
data.registerOption( m_dialog->connection_timewait, fwoptions, "pix_connection_timewait" );
|
||||
data.registerOption( m_dialog->floodguard, fwoptions, "pix_floodguard" );
|
||||
data.registerOption( m_dialog->nodnsalias_inbound, fwoptions, "pix_nodnsalias_inbound" );
|
||||
data.registerOption( m_dialog->nodnsalias_outbound, fwoptions, "pix_nodnsalias_outbound" );
|
||||
data.registerOption( m_dialog->connection_timewait, fwoptions, "pix_connection_timewait");
|
||||
data.registerOption( m_dialog->floodguard, fwoptions, "pix_floodguard");
|
||||
data.registerOption( m_dialog->nodnsalias_inbound, fwoptions, "pix_nodnsalias_inbound");
|
||||
data.registerOption( m_dialog->nodnsalias_outbound, fwoptions, "pix_nodnsalias_outbound");
|
||||
|
||||
data.registerOption( m_dialog->max_conns, fwoptions, "pix_max_conns" );
|
||||
data.registerOption( m_dialog->emb_limit, fwoptions, "pix_emb_limit" );
|
||||
data.registerOption( m_dialog->max_conns, fwoptions, "pix_max_conns");
|
||||
data.registerOption( m_dialog->emb_limit, fwoptions, "pix_emb_limit");
|
||||
|
||||
data.loadAll();
|
||||
loadFixups();
|
||||
@ -665,7 +770,7 @@ void pixAdvancedDialog::saveFixups()
|
||||
ostringstream str;
|
||||
str << sw << " " << p1 << " " << p2 << " " << on << " " << int(ov);
|
||||
|
||||
options->setStr( fi->fwoption.toLatin1().constData() , str.str() );
|
||||
options->setStr( fi->fwoption.toLatin1().constData(), str.str() );
|
||||
}
|
||||
}
|
||||
|
||||
@ -759,8 +864,10 @@ void pixAdvancedDialog::accept()
|
||||
// pis->setCommand( installScript->text() );
|
||||
// pis->setArguments( installScriptArgs->text() );
|
||||
|
||||
mgmt->setAddress( *((Firewall::cast(obj))->getAddressPtr()) );
|
||||
|
||||
// find first interface marked as "management"
|
||||
const InetAddr *mgmt_addr = Firewall::cast(obj)->getManagementAddress();
|
||||
if (mgmt_addr)
|
||||
mgmt->setAddress(*mgmt_addr);
|
||||
|
||||
if (syslogDeviceIdSupported)
|
||||
{
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -8,8 +8,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>647</width>
|
||||
<height>426</height>
|
||||
<width>669</width>
|
||||
<height>429</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
@ -59,7 +59,7 @@
|
||||
</palette>
|
||||
</property>
|
||||
<property name="currentIndex" >
|
||||
<number>0</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="Widget2" >
|
||||
<attribute name="title" >
|
||||
@ -119,7 +119,7 @@
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>41</width>
|
||||
<height>20</height>
|
||||
@ -135,7 +135,7 @@
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
@ -158,7 +158,7 @@
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>81</width>
|
||||
<height>20</height>
|
||||
@ -225,7 +225,7 @@
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>211</width>
|
||||
<height>20</height>
|
||||
@ -279,7 +279,7 @@
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>91</width>
|
||||
<height>20</height>
|
||||
@ -305,7 +305,7 @@
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>86</width>
|
||||
<height>31</height>
|
||||
@ -320,22 +320,10 @@
|
||||
<string>Revision Control</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
@ -353,7 +341,7 @@
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
@ -367,11 +355,11 @@
|
||||
<attribute name="title" >
|
||||
<string>SSH</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<layout class="QGridLayout" name="gridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="textLabel1_5_2" >
|
||||
<property name="text" >
|
||||
<string>A full path to the Secure Shell utility (remote command execution; for example ssh on Unix or plink.exe or vsh.exe on Windows):</string>
|
||||
<string>A full path to the Secure Shell utility (remote command execution; for example ssh on Unix or plink.exe on Windows):</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignVCenter</set>
|
||||
@ -398,11 +386,40 @@
|
||||
<widget class="QLineEdit" name="sshPath" />
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="textLabel1_5_3" >
|
||||
<property name="text" >
|
||||
<string>A full path to the SCP utility (file copy over ssh; for example scp on Unix or pscp.exe on Windows):</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QPushButton" name="browseForSCP" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2" >
|
||||
<widget class="QLineEdit" name="scpPath" />
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
@ -410,7 +427,7 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2" >
|
||||
<item row="5" column="0" colspan="2" >
|
||||
<widget class="QTextBrowser" name="plink_hint" >
|
||||
<property name="palette" >
|
||||
<palette>
|
||||
@ -459,9 +476,10 @@
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="html" >
|
||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Monospace'; font-size:12pt; font-weight:400; font-style:normal;">
|
||||
</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;">Download plink.exe from the web site at <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/"><span style=" text-decoration: underline; color:#0000ff;">http://www.chiark.greenend.org.uk/~sgtatham/putty/</span></a></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"></p></body></html></string>
|
||||
</property>
|
||||
@ -470,7 +488,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" >
|
||||
<item row="6" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
@ -478,7 +496,7 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>505</width>
|
||||
<height>61</height>
|
||||
@ -493,22 +511,10 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Labels</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="3" >
|
||||
@ -532,7 +538,7 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>70</width>
|
||||
<height>20</height>
|
||||
@ -548,7 +554,7 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
@ -558,22 +564,10 @@ p, li { white-space: pre-wrap; }
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
@ -737,7 +731,7 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
@ -827,7 +821,7 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
@ -842,22 +836,10 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Libraries</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<property name="margin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="0" >
|
||||
@ -931,16 +913,7 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
@ -951,7 +924,7 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
@ -1348,5 +1321,25 @@ p, li { white-space: pre-wrap; }
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>browseForSCP</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>prefsDialog_q</receiver>
|
||||
<slot>findSCP()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>590</x>
|
||||
<y>138</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>334</x>
|
||||
<y>214</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>findSSH()</slot>
|
||||
<slot>findSCP()</slot>
|
||||
</slots>
|
||||
</ui>
|
||||
|
@ -90,6 +90,7 @@ static int verbose = 0;
|
||||
static int test_mode = 0;
|
||||
static bool ipv4_run = true;
|
||||
static bool ipv6_run = true;
|
||||
static bool fw_by_id = false;
|
||||
|
||||
FWObjectDatabase *objdb = NULL;
|
||||
|
||||
@ -127,10 +128,13 @@ int main(int argc, char * const * argv)
|
||||
|
||||
int opt;
|
||||
|
||||
while( (opt=getopt(argc,argv,"x:vVf:d:r:tLo:46")) != EOF )
|
||||
while( (opt=getopt(argc,argv,"x:ivVf:d:r:tLo:46")) != EOF )
|
||||
{
|
||||
switch(opt)
|
||||
{
|
||||
case 'i':
|
||||
fw_by_id = true;
|
||||
break;
|
||||
case '4':
|
||||
ipv4_run = true;
|
||||
ipv6_run = false;
|
||||
@ -192,11 +196,6 @@ int main(int argc, char * const * argv)
|
||||
|
||||
fwobjectname = strdup( argv[optind++] );
|
||||
|
||||
if (ofname.empty())
|
||||
{
|
||||
ofname=string(fwobjectname)+".fw";
|
||||
}
|
||||
|
||||
if (filename==NULL || fwobjectname==NULL)
|
||||
{
|
||||
usage(argv[0]);
|
||||
@ -240,16 +239,23 @@ int main(int argc, char * const * argv)
|
||||
|
||||
if (verbose) cout << " done\n";
|
||||
|
||||
/* why do I do this ?
|
||||
/*
|
||||
* some general sanity checks first
|
||||
*/
|
||||
Firewall* fw;
|
||||
if (fw_by_id)
|
||||
{
|
||||
// fwobjectname is actually object id
|
||||
fw = Firewall::cast(
|
||||
objdb->findInIndex(objdb->getIntId(fwobjectname)));
|
||||
fwobjectname = fw->getName().c_str();
|
||||
}
|
||||
else
|
||||
fw = objdb->findFirewallByName(fwobjectname);
|
||||
|
||||
FWObject *slib = objdb->findInIndex("syslib000");
|
||||
if ( slib->isReadOnly()) slib->setReadOnly(false);
|
||||
*/
|
||||
if (ofname.empty())
|
||||
ofname = string(fwobjectname)+".fw";
|
||||
|
||||
/*
|
||||
* some general sanity checks first
|
||||
*/
|
||||
Firewall* fw=objdb->findFirewallByName(fwobjectname);
|
||||
FWOptions* options=fw->getOptionsObject();
|
||||
|
||||
string fwvers = fw->getStr("version");
|
||||
|
104
src/ipf/ipf.cpp
104
src/ipf/ipf.cpp
@ -91,14 +91,39 @@ static const char *fwobjectname = NULL;
|
||||
static string fw_file_name = "";
|
||||
static string ipf_file_name = "";
|
||||
static string nat_file_name = "";
|
||||
static string output_dir = "";
|
||||
static int dl = 0;
|
||||
static int drp = -1;
|
||||
static int drn = -1;
|
||||
static int verbose = 0;
|
||||
static bool test_mode = false;
|
||||
static bool fw_by_id = false;
|
||||
|
||||
FWObjectDatabase *objdb = NULL;
|
||||
|
||||
#ifdef _WIN32
|
||||
string fs_separator = "\\";
|
||||
#else
|
||||
string fs_separator = "/";
|
||||
#endif
|
||||
|
||||
string getFileName(const string &file_path)
|
||||
{
|
||||
string::size_type n = file_path.rfind(fs_separator);
|
||||
string res = file_path;
|
||||
res.erase(0, n+1);
|
||||
return res;
|
||||
}
|
||||
|
||||
string getDir(const string &file_path)
|
||||
{
|
||||
string::size_type n = file_path.rfind(fs_separator);
|
||||
string res = file_path;
|
||||
if (n==string::npos) return "";
|
||||
else res.erase(n);
|
||||
return res;
|
||||
}
|
||||
|
||||
class UpgradePredicate: public XMLTools::UpgradePredicate
|
||||
{
|
||||
public:
|
||||
@ -159,10 +184,13 @@ int main(int argc, char * const *argv)
|
||||
|
||||
int opt;
|
||||
|
||||
while( (opt=getopt(argc,argv,"x:vVf:d:r:o:")) != EOF )
|
||||
while( (opt=getopt(argc,argv,"x:ivVf:d:r:o:")) != EOF )
|
||||
{
|
||||
switch(opt)
|
||||
{
|
||||
case 'i':
|
||||
fw_by_id = true;
|
||||
break;
|
||||
case 'd':
|
||||
wdir = strdup(optarg);
|
||||
break;
|
||||
@ -211,22 +239,6 @@ int main(int argc, char * const *argv)
|
||||
|
||||
fwobjectname = strdup( argv[optind++] );
|
||||
|
||||
if (fw_file_name.empty())
|
||||
{
|
||||
fw_file_name=string(fwobjectname)+".fw";
|
||||
ipf_file_name=string(fwobjectname)+"-ipf.conf";
|
||||
nat_file_name=string(fwobjectname)+"-nat.conf";
|
||||
} else
|
||||
{
|
||||
string::size_type n = fw_file_name.rfind(".");
|
||||
ipf_file_name = fw_file_name;
|
||||
ipf_file_name.erase(n);
|
||||
ipf_file_name.append("-ipf.conf");
|
||||
nat_file_name = fw_file_name;
|
||||
nat_file_name.erase(n);
|
||||
nat_file_name.append("-nat.conf");
|
||||
}
|
||||
|
||||
if (wdir==0) wdir="./";
|
||||
|
||||
if (
|
||||
@ -270,8 +282,36 @@ int main(int argc, char * const *argv)
|
||||
if (slib && slib->isReadOnly()) slib->setReadOnly(false);
|
||||
|
||||
/* Review firewall and OS options and generate commands */
|
||||
Firewall* fw=objdb->findFirewallByName(fwobjectname);
|
||||
|
||||
Firewall* fw;
|
||||
if (fw_by_id)
|
||||
{
|
||||
// fwobjectname is actually object id
|
||||
fw = Firewall::cast(
|
||||
objdb->findInIndex(objdb->getIntId(fwobjectname)));
|
||||
fwobjectname = fw->getName().c_str();
|
||||
}
|
||||
else
|
||||
fw = objdb->findFirewallByName(fwobjectname);
|
||||
|
||||
if (fw_file_name.empty())
|
||||
{
|
||||
fw_file_name = string(fwobjectname)+".fw";
|
||||
ipf_file_name = string(fwobjectname)+"-ipf.conf";
|
||||
nat_file_name = string(fwobjectname)+"-nat.conf";
|
||||
output_dir = "";
|
||||
} else
|
||||
{
|
||||
string::size_type n = fw_file_name.rfind(".");
|
||||
ipf_file_name = getFileName(fw_file_name);
|
||||
ipf_file_name.erase(n);
|
||||
ipf_file_name.append("-ipf.conf");
|
||||
nat_file_name = getFileName(fw_file_name);
|
||||
nat_file_name.erase(n);
|
||||
nat_file_name.append("-nat.conf");
|
||||
output_dir = getDir(fw_file_name);
|
||||
if (!output_dir.empty()) output_dir += "/";
|
||||
}
|
||||
|
||||
if (verbose) cout << _(" *** Data checks ...");
|
||||
|
||||
/* some initial sanity checks */
|
||||
@ -443,11 +483,11 @@ int main(int argc, char * const *argv)
|
||||
# Generated ") << timestr << " " << tzname[stm->tm_isdst] << _(" by ")
|
||||
<< user_name << "\n#\n#\n";
|
||||
|
||||
fw_file << MANIFEST_MARKER << "* " << fw_file_name << endl;
|
||||
fw_file << MANIFEST_MARKER << "* " << getFileName(fw_file_name) << endl;
|
||||
if (have_ipf)
|
||||
fw_file << MANIFEST_MARKER << " " << ipf_file_name << endl;
|
||||
fw_file << MANIFEST_MARKER << " " << getFileName(ipf_file_name) << endl;
|
||||
if (have_nat)
|
||||
fw_file << MANIFEST_MARKER << " " << nat_file_name << endl;
|
||||
fw_file << MANIFEST_MARKER << " " << getFileName(nat_file_name) << endl;
|
||||
fw_file << "#" << endl;
|
||||
fw_file << "#" << endl;
|
||||
|
||||
@ -501,16 +541,18 @@ int main(int argc, char * const *argv)
|
||||
fw_file << "# End of prolog script" << endl;
|
||||
fw_file << "#" << endl;
|
||||
|
||||
unlink(ipf_file_name.c_str());
|
||||
string file_name = output_dir + ipf_file_name;
|
||||
|
||||
unlink(file_name.c_str());
|
||||
if (have_ipf)
|
||||
{
|
||||
ofstream ipf_file;
|
||||
ipf_file.exceptions(ofstream::eofbit|ofstream::failbit|ofstream::badbit);
|
||||
|
||||
#ifdef _WIN32
|
||||
ipf_file.open(ipf_file_name.c_str(), ios::out|ios::binary);
|
||||
ipf_file.open(file_name.c_str(), ios::out|ios::binary);
|
||||
#else
|
||||
ipf_file.open(ipf_file_name.c_str());
|
||||
ipf_file.open(file_name.c_str());
|
||||
#endif
|
||||
|
||||
if (c.haveErrorsAndWarnings())
|
||||
@ -524,28 +566,30 @@ int main(int argc, char * const *argv)
|
||||
ipf_file.close();
|
||||
|
||||
string cmd = string("$IPF ")+ipf_dbg+" -I -f ";
|
||||
string filePath = string("${FWDIR}/")+ipf_file_name;
|
||||
string filePath = string("${FWDIR}/") + ipf_file_name;
|
||||
if (fw->getOptionsObject()->getBool("dynAddr"))
|
||||
{
|
||||
cmd += "-";
|
||||
fw_file <<
|
||||
printActivationCommandWithSubstitution(fw,filePath,cmd);
|
||||
printActivationCommandWithSubstitution(fw, filePath, cmd);
|
||||
} else
|
||||
{
|
||||
fw_file << cmd << filePath << endl;
|
||||
}
|
||||
}
|
||||
|
||||
unlink(nat_file_name.c_str());
|
||||
file_name = output_dir + nat_file_name;
|
||||
|
||||
unlink(file_name.c_str());
|
||||
if (have_nat)
|
||||
{
|
||||
ofstream nat_file;
|
||||
nat_file.exceptions(ofstream::eofbit|ofstream::failbit|ofstream::badbit);
|
||||
|
||||
#ifdef _WIN32
|
||||
nat_file.open(nat_file_name.c_str(), ios::out|ios::binary);
|
||||
nat_file.open(file_name.c_str(), ios::out|ios::binary);
|
||||
#else
|
||||
nat_file.open(nat_file_name.c_str());
|
||||
nat_file.open(file_name.c_str());
|
||||
#endif
|
||||
|
||||
if (n.haveErrorsAndWarnings())
|
||||
|
@ -98,9 +98,33 @@ static int verbose = 0;
|
||||
static bool test_mode = false;
|
||||
static bool ipv4_run = true;
|
||||
static bool ipv6_run = true;
|
||||
static bool fw_by_id = false;
|
||||
|
||||
FWObjectDatabase *objdb = NULL;
|
||||
|
||||
#ifdef _WIN32
|
||||
string fs_separator = "\\";
|
||||
#else
|
||||
string fs_separator = "/";
|
||||
#endif
|
||||
|
||||
string getFileName(const string &file_path)
|
||||
{
|
||||
string::size_type n = file_path.rfind(fs_separator);
|
||||
string res = file_path;
|
||||
res.erase(0, n+1);
|
||||
return res;
|
||||
}
|
||||
|
||||
string getDir(const string &file_path)
|
||||
{
|
||||
string::size_type n = file_path.rfind(fs_separator);
|
||||
string res = file_path;
|
||||
if (n==string::npos) return "";
|
||||
else res.erase(n);
|
||||
return res;
|
||||
}
|
||||
|
||||
class UpgradePredicate: public XMLTools::UpgradePredicate
|
||||
{
|
||||
public:
|
||||
@ -168,10 +192,13 @@ int main(int argc, char * const *argv)
|
||||
|
||||
int opt;
|
||||
|
||||
while( (opt=getopt(argc,argv,"x:vVf:d:r:o:46")) != EOF )
|
||||
while( (opt=getopt(argc,argv,"x:ivVf:d:r:o:46")) != EOF )
|
||||
{
|
||||
switch(opt)
|
||||
{
|
||||
case 'i':
|
||||
fw_by_id = true;
|
||||
break;
|
||||
case '4':
|
||||
ipv4_run = true;
|
||||
ipv6_run = false;
|
||||
@ -228,11 +255,6 @@ int main(int argc, char * const *argv)
|
||||
|
||||
fwobjectname = strdup( argv[optind++] );
|
||||
|
||||
if (fw_file_name.empty())
|
||||
{
|
||||
fw_file_name=string(fwobjectname)+".fw";
|
||||
}
|
||||
|
||||
if (wdir==0) wdir="./";
|
||||
|
||||
if (
|
||||
@ -276,7 +298,21 @@ int main(int argc, char * const *argv)
|
||||
if (slib && slib->isReadOnly()) slib->setReadOnly(false);
|
||||
|
||||
/* Review firewall and OS options and generate commands */
|
||||
Firewall* fw=objdb->findFirewallByName(fwobjectname);
|
||||
Firewall* fw;
|
||||
if (fw_by_id)
|
||||
{
|
||||
// fwobjectname is actually object id
|
||||
fw = Firewall::cast(
|
||||
objdb->findInIndex(objdb->getIntId(fwobjectname)));
|
||||
fwobjectname = fw->getName().c_str();
|
||||
}
|
||||
else
|
||||
fw = objdb->findFirewallByName(fwobjectname);
|
||||
|
||||
if (fw_file_name.empty())
|
||||
{
|
||||
fw_file_name=string(fwobjectname)+".fw";
|
||||
}
|
||||
|
||||
/* some initial sanity checks */
|
||||
list<FWObject*> l2=fw->getByType(Interface::TYPENAME);
|
||||
@ -551,7 +587,7 @@ int main(int argc, char * const *argv)
|
||||
# Generated ") << timestr << " " << tzname[stm->tm_isdst] << _(" by ")
|
||||
<< user_name << "\n#\n";
|
||||
|
||||
fw_file << MANIFEST_MARKER << "* " << fw_file_name << endl;
|
||||
fw_file << MANIFEST_MARKER << "* " << getFileName(fw_file_name) << endl;
|
||||
fw_file << "#" << endl;
|
||||
fw_file << "#" << endl;
|
||||
|
||||
|
@ -102,11 +102,36 @@ static bool have_dynamic_interfaces = false;
|
||||
static bool test_mode = false;
|
||||
static bool ipv4_run = true;
|
||||
static bool ipv6_run = true;
|
||||
static bool fw_by_id = false;
|
||||
|
||||
|
||||
FWObjectDatabase *objdb = NULL;
|
||||
|
||||
static map<string,RuleSet*> branches;
|
||||
|
||||
#ifdef _WIN32
|
||||
string fs_separator = "\\";
|
||||
#else
|
||||
string fs_separator = "/";
|
||||
#endif
|
||||
|
||||
string getFileName(const string &file_path)
|
||||
{
|
||||
string::size_type n = file_path.rfind(fs_separator);
|
||||
string res = file_path;
|
||||
res.erase(0, n+1);
|
||||
return res;
|
||||
}
|
||||
|
||||
string getDir(const string &file_path)
|
||||
{
|
||||
string::size_type n = file_path.rfind(fs_separator);
|
||||
string res = file_path;
|
||||
if (n==string::npos) return "";
|
||||
else res.erase(n);
|
||||
return res;
|
||||
}
|
||||
|
||||
class UpgradePredicate: public XMLTools::UpgradePredicate
|
||||
{
|
||||
public:
|
||||
@ -306,10 +331,13 @@ int main(int argc, char * const *argv)
|
||||
|
||||
int opt;
|
||||
|
||||
while( (opt=getopt(argc,argv,"x:vVqf:d:r:o:46")) != EOF )
|
||||
while( (opt=getopt(argc,argv,"x:ivVqf:d:r:o:46")) != EOF )
|
||||
{
|
||||
switch(opt)
|
||||
{
|
||||
case 'i':
|
||||
fw_by_id = true;
|
||||
break;
|
||||
case '4':
|
||||
ipv4_run = true;
|
||||
ipv6_run = false;
|
||||
@ -369,9 +397,6 @@ int main(int argc, char * const *argv)
|
||||
|
||||
fwobjectname = strdup( argv[optind++] );
|
||||
|
||||
if (fw_file_name.empty())
|
||||
fw_file_name=string(fwobjectname)+".fw";
|
||||
|
||||
if (wdir==0) wdir="./";
|
||||
|
||||
if (
|
||||
@ -418,10 +443,24 @@ int main(int argc, char * const *argv)
|
||||
if (slib && slib->isReadOnly()) slib->setReadOnly(false);
|
||||
|
||||
/* Review firewall and OS options and generate commands */
|
||||
Firewall* fw = objdb->findFirewallByName(fwobjectname);
|
||||
|
||||
Firewall* fw;
|
||||
if (fw_by_id)
|
||||
{
|
||||
// fwobjectname is actually object id
|
||||
fw = Firewall::cast(
|
||||
objdb->findInIndex(objdb->getIntId(fwobjectname)));
|
||||
fwobjectname = fw->getName().c_str();
|
||||
}
|
||||
else
|
||||
fw = objdb->findFirewallByName(fwobjectname);
|
||||
|
||||
FWOptions* options = fw->getOptionsObject();
|
||||
string s;
|
||||
|
||||
if (fw_file_name.empty())
|
||||
fw_file_name=string(fwobjectname)+".fw";
|
||||
|
||||
/* some initial sanity checks */
|
||||
|
||||
list<FWObject*> l2 = fw->getByType(Interface::TYPENAME);
|
||||
@ -914,7 +953,7 @@ _("Dynamic interface %s should not have an IP address object attached to it. Thi
|
||||
<< user_name << "\n#\n";
|
||||
}
|
||||
|
||||
script << MANIFEST_MARKER << "* " << fw_file_name << endl;
|
||||
script << MANIFEST_MARKER << "* " << getFileName(fw_file_name) << endl;
|
||||
script << "#" << endl;
|
||||
script << "#" << endl;
|
||||
script << "# Compiled for iptables " << fw_version << endl;
|
||||
|
103
src/pf/pf.cpp
103
src/pf/pf.cpp
@ -93,7 +93,7 @@ static const char *filename = NULL;
|
||||
static const char *wdir = NULL;
|
||||
static const char *fwobjectname = NULL;
|
||||
static string fw_file_name = "";
|
||||
static string pf_file_name = "";
|
||||
static string output_dir = "";
|
||||
static int dl = 0;
|
||||
static int drp = -1;
|
||||
static int drn = -1;
|
||||
@ -101,6 +101,13 @@ static int verbose = 0;
|
||||
static bool test_mode = false;
|
||||
static bool ipv4_run = true;
|
||||
static bool ipv6_run = true;
|
||||
static bool fw_by_id = false;
|
||||
|
||||
#ifdef _WIN32
|
||||
string fs_separator = "\\";
|
||||
#else
|
||||
string fs_separator = "/";
|
||||
#endif
|
||||
|
||||
// Note that in the following maps ruleset name will be
|
||||
// "__main__" for both main Policy and NAT rulesets.
|
||||
@ -144,27 +151,43 @@ void join::operator()(std::string &s)
|
||||
*result += s;
|
||||
}
|
||||
|
||||
string getFileName(const string &file_path)
|
||||
{
|
||||
string::size_type n = file_path.rfind(fs_separator);
|
||||
string res = file_path;
|
||||
res.erase(0, n+1);
|
||||
return res;
|
||||
}
|
||||
|
||||
string getDir(const string &file_path)
|
||||
{
|
||||
string::size_type n = file_path.rfind(fs_separator);
|
||||
string res = file_path;
|
||||
if (n==string::npos) return "";
|
||||
else res.erase(n);
|
||||
return res;
|
||||
}
|
||||
|
||||
string getConfFileName(const string &ruleset_name,
|
||||
const string &fwobjectname,
|
||||
const string &fw_file_name)
|
||||
{
|
||||
string conf_file_name;
|
||||
if (ruleset_name == "__main__")
|
||||
conf_file_name = string(fwobjectname) + ".conf";
|
||||
else
|
||||
string suffix = "-" + ruleset_name;
|
||||
if (ruleset_name == "__main__") suffix = "";
|
||||
|
||||
if (fw_file_name.empty())
|
||||
{
|
||||
if (fw_file_name.empty())
|
||||
{
|
||||
conf_file_name = string(fwobjectname) + "-" +
|
||||
ruleset_name + ".conf";
|
||||
} else
|
||||
{
|
||||
string::size_type n = fw_file_name.rfind(".");
|
||||
conf_file_name = fw_file_name;
|
||||
conf_file_name.erase(n);
|
||||
conf_file_name.append("-" + ruleset_name + ".conf");
|
||||
}
|
||||
conf_file_name = string(fwobjectname) + suffix + ".conf";
|
||||
} else
|
||||
{
|
||||
string just_file = getFileName(fw_file_name);
|
||||
string::size_type n = just_file.rfind(".");
|
||||
conf_file_name = just_file;
|
||||
conf_file_name.erase(n);
|
||||
conf_file_name.append(suffix + ".conf");
|
||||
}
|
||||
|
||||
return conf_file_name;
|
||||
}
|
||||
|
||||
@ -196,8 +219,6 @@ void findImportedRuleSets(Firewall *fw, list<FWObject*> &all_policies)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void usage(const char *name)
|
||||
{
|
||||
cout << _("Firewall Builder: policy compiler for OpenBSD PF") << endl;
|
||||
@ -440,10 +461,13 @@ int main(int argc, char * const *argv)
|
||||
|
||||
int opt;
|
||||
|
||||
while( (opt=getopt(argc,argv,"x:vVf:d:r:o:46")) != EOF )
|
||||
while( (opt=getopt(argc,argv,"x:ivVf:d:r:o:46")) != EOF )
|
||||
{
|
||||
switch(opt)
|
||||
{
|
||||
case 'i':
|
||||
fw_by_id = true;
|
||||
break;
|
||||
case '4':
|
||||
ipv4_run = true;
|
||||
ipv6_run = false;
|
||||
@ -500,18 +524,6 @@ int main(int argc, char * const *argv)
|
||||
|
||||
fwobjectname = strdup( argv[optind++] );
|
||||
|
||||
if (fw_file_name.empty())
|
||||
{
|
||||
fw_file_name=string(fwobjectname)+".fw";
|
||||
pf_file_name=string(fwobjectname)+".conf";
|
||||
} else
|
||||
{
|
||||
string::size_type n = fw_file_name.rfind(".");
|
||||
pf_file_name = fw_file_name;
|
||||
pf_file_name.erase(n);
|
||||
pf_file_name.append(".conf");
|
||||
}
|
||||
|
||||
if (wdir==0) wdir="./";
|
||||
|
||||
if (
|
||||
@ -556,7 +568,26 @@ int main(int argc, char * const *argv)
|
||||
if (slib && slib->isReadOnly()) slib->setReadOnly(false);
|
||||
|
||||
/* Review firewall and OS options and generate commands */
|
||||
Firewall* fw=objdb->findFirewallByName(fwobjectname);
|
||||
Firewall* fw;
|
||||
if (fw_by_id)
|
||||
{
|
||||
// fwobjectname is actually object id
|
||||
fw = Firewall::cast(
|
||||
objdb->findInIndex(objdb->getIntId(fwobjectname)));
|
||||
fwobjectname = fw->getName().c_str();
|
||||
}
|
||||
else
|
||||
fw = objdb->findFirewallByName(fwobjectname);
|
||||
|
||||
if (fw_file_name.empty())
|
||||
{
|
||||
fw_file_name = string(fwobjectname)+".fw";
|
||||
output_dir = "";
|
||||
} else
|
||||
{
|
||||
output_dir = getDir(fw_file_name);
|
||||
if (!output_dir.empty()) output_dir += "/";
|
||||
}
|
||||
|
||||
/* some initial sanity checks */
|
||||
list<FWObject*> all_interfaces=fw->getByType(Interface::TYPENAME);
|
||||
@ -858,7 +889,7 @@ int main(int argc, char * const *argv)
|
||||
fi!=generated_scripts.end(); fi++)
|
||||
{
|
||||
string ruleset_name = fi->first;
|
||||
string file_name = conf_files[ruleset_name];
|
||||
string file_name = output_dir + conf_files[ruleset_name];
|
||||
ostringstream *strm = fi->second;
|
||||
|
||||
ofstream pf_file;
|
||||
@ -876,7 +907,6 @@ int main(int argc, char * const *argv)
|
||||
printStaticOptions(pf_file, fw);
|
||||
}
|
||||
pf_file << table_factories[ruleset_name]->PrintTables();
|
||||
|
||||
pf_file << strm->str();
|
||||
pf_file.close();
|
||||
}
|
||||
@ -925,11 +955,10 @@ int main(int argc, char * const *argv)
|
||||
# Generated ") << timestr << " " << tzname[stm->tm_isdst] << _(" by ")
|
||||
<< user_name << "\n#\n";
|
||||
|
||||
fw_file << MANIFEST_MARKER << "* " << fw_file_name << endl;
|
||||
//fw_file << MANIFEST_MARKER << " " << pf_file_name << endl;
|
||||
fw_file << MANIFEST_MARKER << "* " << getFileName(fw_file_name) << endl;
|
||||
for (map<string,string>::iterator i=conf_files.begin();
|
||||
i!=conf_files.end(); ++i)
|
||||
fw_file << MANIFEST_MARKER << " " << i->second << endl;
|
||||
fw_file << MANIFEST_MARKER << " " << getFileName(i->second) << endl;
|
||||
|
||||
fw_file << "#" << endl;
|
||||
fw_file << "#" << endl;
|
||||
@ -965,7 +994,7 @@ int main(int argc, char * const *argv)
|
||||
fw_file << endl;
|
||||
|
||||
fw_file << "$PFCTL " << pfctl_dbg << pfctl_f_option
|
||||
<< "${FWDIR}/" << pf_file_name
|
||||
<< "${FWDIR}/" << getFileName(conf_files["__main__"])
|
||||
<< " || exit 1"
|
||||
<< endl;
|
||||
|
||||
|
@ -88,6 +88,7 @@ static int drn = -1;
|
||||
static int verbose = 0;
|
||||
static int test_mode = 0;
|
||||
static int only_print_inspection_code = 0;
|
||||
static bool fw_by_id = false;
|
||||
|
||||
FWObjectDatabase *objdb = NULL;
|
||||
|
||||
@ -146,11 +147,14 @@ int main(int argc, char * const * argv)
|
||||
|
||||
int opt;
|
||||
|
||||
while( (opt=getopt(argc,argv,"x:vVf:d:r:tLo:i")) != EOF )
|
||||
while( (opt=getopt(argc,argv,"x:ivVf:d:r:tLo:I")) != EOF )
|
||||
{
|
||||
switch(opt)
|
||||
{
|
||||
case 'i':
|
||||
fw_by_id = true;
|
||||
break;
|
||||
case 'I':
|
||||
only_print_inspection_code++;
|
||||
break;
|
||||
case 'd':
|
||||
@ -209,11 +213,6 @@ int main(int argc, char * const * argv)
|
||||
|
||||
fwobjectname = strdup( argv[optind++] );
|
||||
|
||||
if (ofname.empty())
|
||||
{
|
||||
ofname=string(fwobjectname)+".fw";
|
||||
}
|
||||
|
||||
if (filename==NULL || fwobjectname==NULL)
|
||||
{
|
||||
usage(argv[0]);
|
||||
@ -269,16 +268,23 @@ int main(int argc, char * const * argv)
|
||||
|
||||
if (verbose) cout << " done\n";
|
||||
|
||||
/* why do I do this ?
|
||||
/*
|
||||
* some general sanity checks first
|
||||
*/
|
||||
Firewall* fw;
|
||||
if (fw_by_id)
|
||||
{
|
||||
// fwobjectname is actually object id
|
||||
fw = Firewall::cast(
|
||||
objdb->findInIndex(objdb->getIntId(fwobjectname)));
|
||||
fwobjectname = fw->getName().c_str();
|
||||
}
|
||||
else
|
||||
fw = objdb->findFirewallByName(fwobjectname);
|
||||
|
||||
FWObject *slib = objdb->findInIndex("syslib000");
|
||||
if ( slib->isReadOnly()) slib->setReadOnly(false);
|
||||
*/
|
||||
if (ofname.empty())
|
||||
ofname=string(fwobjectname)+".fw";
|
||||
|
||||
/*
|
||||
* some general sanity checks first
|
||||
*/
|
||||
Firewall* fw=objdb->findFirewallByName(fwobjectname);
|
||||
FWOptions* options=fw->getOptionsObject();
|
||||
|
||||
bool pix_acl_basic=options->getBool("pix_acl_basic");
|
||||
|
Loading…
x
Reference in New Issue
Block a user