mirror of
https://github.com/tnodir/fort
synced 2024-11-15 12:05:10 +00:00
UI: AppGroup: Use "wildcard search" for "Kill Process" option
This commit is contained in:
parent
6dfd4373c2
commit
ab7ef64bba
@ -41,7 +41,7 @@ typedef struct fort_conf_flags
|
||||
UINT32 log_blocked_ip : 1;
|
||||
UINT32 log_alerted_blocked_ip : 1;
|
||||
|
||||
UINT32 group_apply_child : 1;
|
||||
UINT32 group_wildcard : 1;
|
||||
|
||||
UINT32 group_bits : 16;
|
||||
} FORT_CONF_FLAGS, *PFORT_CONF_FLAGS;
|
||||
|
@ -386,7 +386,7 @@ inline static void fort_pstree_check_proc_conf(
|
||||
|
||||
const PFORT_CONF conf = &conf_ref->conf;
|
||||
|
||||
const FORT_APP_FLAGS app_flags = conf->flags.group_apply_child
|
||||
const FORT_APP_FLAGS app_flags = conf->flags.group_wildcard
|
||||
? fort_conf_app_find(conf, path_buf, path_len, fort_conf_exe_find, conf_ref)
|
||||
: fort_conf_exe_find(conf, conf_ref, path_buf, path_len);
|
||||
|
||||
|
@ -173,10 +173,13 @@ void FirewallConf::setAppGroupBits(quint32 groupBits)
|
||||
m_appGroupBits = groupBits;
|
||||
}
|
||||
|
||||
bool FirewallConf::appGroupApplyChild() const
|
||||
bool FirewallConf::appGroupWildcard() const
|
||||
{
|
||||
for (const AppGroup *appGroup : appGroups()) {
|
||||
if (appGroup->enabled() && appGroup->applyChild())
|
||||
if (!appGroup->enabled())
|
||||
continue;
|
||||
|
||||
if (appGroup->applyChild() || !appGroup->killText().isEmpty())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -106,7 +106,7 @@ public:
|
||||
quint32 appGroupBits() const { return m_appGroupBits; }
|
||||
void setAppGroupBits(quint32 groupBits);
|
||||
|
||||
bool appGroupApplyChild() const;
|
||||
bool appGroupWildcard() const;
|
||||
|
||||
bool appGroupEnabled(int groupIndex) const;
|
||||
|
||||
|
@ -73,7 +73,7 @@ void writeConfFlags(const FirewallConf &conf, PFORT_CONF_FLAGS confFlags)
|
||||
confFlags->log_blocked_ip = conf.logBlockedIp();
|
||||
confFlags->log_alerted_blocked_ip = conf.logAlertedBlockedIp();
|
||||
|
||||
confFlags->group_apply_child = conf.appGroupApplyChild();
|
||||
confFlags->group_wildcard = conf.appGroupWildcard();
|
||||
confFlags->group_bits = conf.appGroupBits();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user