mirror of
https://github.com/tnodir/fort
synced 2024-11-15 05:36:09 +00:00
FirewallConf.appLogBlocked is effective for UI only.
This commit is contained in:
parent
45af8d2167
commit
bb4c80c391
@ -117,7 +117,8 @@ fort_conf_app_blocked (const PFORT_CONF conf,
|
|||||||
const BOOL app_perm_allowed = (app_perm & conf->app_perms_allow_mask);
|
const BOOL app_perm_allowed = (app_perm & conf->app_perms_allow_mask);
|
||||||
const BOOL app_allowed = conf->flags.app_allow_all ? TRUE : app_perm_allowed;
|
const BOOL app_allowed = conf->flags.app_allow_all ? TRUE : app_perm_allowed;
|
||||||
|
|
||||||
*notify = app_blocked && !app_perm_blocked;
|
*notify = app_blocked && !app_perm_blocked
|
||||||
|
&& conf->flags.app_log_blocked;
|
||||||
|
|
||||||
return app_blocked && !app_allowed;
|
return app_blocked && !app_allowed;
|
||||||
}
|
}
|
||||||
|
@ -40,8 +40,10 @@ HEADERS += \
|
|||||||
|
|
||||||
QML_FILES += \
|
QML_FILES += \
|
||||||
qml/*.qml \
|
qml/*.qml \
|
||||||
|
qml/controls/*.qml
|
||||||
qml/pages/*.qml
|
qml/pages/*.qml
|
||||||
qml/pages/addresses/*.qml
|
qml/pages/addresses/*.qml
|
||||||
|
qml/pages/apps/*.qml
|
||||||
|
|
||||||
OTHER_FILES += \
|
OTHER_FILES += \
|
||||||
$${QML_FILES} \
|
$${QML_FILES} \
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
FirewallConf::FirewallConf(QObject *parent) :
|
FirewallConf::FirewallConf(QObject *parent) :
|
||||||
QObject(parent),
|
QObject(parent),
|
||||||
m_filterEnabled(true),
|
m_filterEnabled(true),
|
||||||
m_appLogBlocked(true),
|
m_appLogBlocked(false),
|
||||||
m_appBlockAll(true),
|
m_appBlockAll(true),
|
||||||
m_appAllowAll(false),
|
m_appAllowAll(false),
|
||||||
m_ipInclude(new AddressGroup(this)),
|
m_ipInclude(new AddressGroup(this)),
|
||||||
|
@ -63,7 +63,8 @@ public slots:
|
|||||||
private:
|
private:
|
||||||
uint m_filterEnabled : 1;
|
uint m_filterEnabled : 1;
|
||||||
|
|
||||||
uint m_appLogBlocked : 1;
|
uint m_appLogBlocked : 1; // transient
|
||||||
|
|
||||||
uint m_appBlockAll : 1;
|
uint m_appBlockAll : 1;
|
||||||
uint m_appAllowAll : 1;
|
uint m_appAllowAll : 1;
|
||||||
|
|
||||||
|
@ -121,7 +121,6 @@ bool FortSettings::readConfFlags(FirewallConf &conf) const
|
|||||||
conf.setFilterEnabled(iniBool("filterEnabled", true));
|
conf.setFilterEnabled(iniBool("filterEnabled", true));
|
||||||
conf.ipInclude()->setUseAll(iniBool("ipIncludeAll"));
|
conf.ipInclude()->setUseAll(iniBool("ipIncludeAll"));
|
||||||
conf.ipExclude()->setUseAll(iniBool("ipExcludeAll"));
|
conf.ipExclude()->setUseAll(iniBool("ipExcludeAll"));
|
||||||
conf.setAppLogBlocked(iniBool("appLogBlocked", true));
|
|
||||||
conf.setAppBlockAll(iniBool("appBlockAll", true));
|
conf.setAppBlockAll(iniBool("appBlockAll", true));
|
||||||
conf.setAppAllowAll(iniBool("appAllowAll"));
|
conf.setAppAllowAll(iniBool("appAllowAll"));
|
||||||
conf.setAppGroupBits(iniUInt("appGroupBits", 0xFFFF));
|
conf.setAppGroupBits(iniUInt("appGroupBits", 0xFFFF));
|
||||||
@ -136,7 +135,6 @@ bool FortSettings::writeConfFlags(const FirewallConf &conf)
|
|||||||
setIniValue("filterEnabled", conf.filterEnabled());
|
setIniValue("filterEnabled", conf.filterEnabled());
|
||||||
setIniValue("ipIncludeAll", conf.ipInclude()->useAll());
|
setIniValue("ipIncludeAll", conf.ipInclude()->useAll());
|
||||||
setIniValue("ipExcludeAll", conf.ipExclude()->useAll());
|
setIniValue("ipExcludeAll", conf.ipExclude()->useAll());
|
||||||
setIniValue("appLogBlocked", conf.appLogBlocked());
|
|
||||||
setIniValue("appBlockAll", conf.appBlockAll());
|
setIniValue("appBlockAll", conf.appBlockAll());
|
||||||
setIniValue("appAllowAll", conf.appAllowAll());
|
setIniValue("appAllowAll", conf.appAllowAll());
|
||||||
setIniValue("appGroupBits", conf.appGroupBits());
|
setIniValue("appGroupBits", conf.appGroupBits());
|
||||||
|
@ -5,4 +5,13 @@ import com.fortfirewall 1.0
|
|||||||
|
|
||||||
BasePage {
|
BasePage {
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
CheckBox {
|
||||||
|
text: QT_TRANSLATE_NOOP("qml", "Enabled")
|
||||||
|
checked: firewallConf.appLogBlocked
|
||||||
|
onToggled: {
|
||||||
|
firewallConf.appLogBlocked = checked;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user