UI: Blocked: Rename default block reason

This commit is contained in:
Nodir Temirkhodjaev 2023-01-17 15:00:59 +03:00
parent cb6558e1f2
commit fbfbcb9016
4 changed files with 7 additions and 8 deletions

View File

@ -304,8 +304,7 @@ FORT_API FORT_APP_FLAGS fort_conf_app_find(const PFORT_CONF conf, const PVOID pa
static BOOL fort_conf_app_blocked_check(const PFORT_CONF conf, INT8 *block_reason, BOOL app_found,
BOOL app_allowed, BOOL app_blocked)
{
*block_reason =
app_found ? FORT_BLOCK_REASON_APP_GROUP_FOUND : FORT_BLOCK_REASON_APP_GROUP_DEFAULT;
*block_reason = app_found ? FORT_BLOCK_REASON_APP_GROUP_FOUND : FORT_BLOCK_REASON_FILTER_MODE;
/* Block All */
if (conf->flags.app_block_all)

View File

@ -18,7 +18,7 @@ enum FortBlockReason {
FORT_BLOCK_REASON_REAUTH,
FORT_BLOCK_REASON_PROGRAM,
FORT_BLOCK_REASON_APP_GROUP_FOUND,
FORT_BLOCK_REASON_APP_GROUP_DEFAULT,
FORT_BLOCK_REASON_FILTER_MODE,
};
#endif // FORTDEF_H

View File

@ -92,7 +92,7 @@ TEST_F(ConfUtilTest, confWriteRead)
ASSERT_TRUE(DriverCommon::confAppBlocked(
data, DriverCommon::confAppFind(data, "System"), &blockReason));
ASSERT_EQ(blockReason, FORT_BLOCK_REASON_APP_GROUP_DEFAULT);
ASSERT_EQ(blockReason, FORT_BLOCK_REASON_FILTER_MODE);
ASSERT_FALSE(DriverCommon::confAppBlocked(data,
DriverCommon::confAppFind(
@ -115,7 +115,7 @@ TEST_F(ConfUtilTest, confWriteRead)
DriverCommon::confAppFind(
data, FileUtil::pathToKernelPath("C:\\Program Files\\Test.exe")),
&blockReason));
ASSERT_EQ(blockReason, FORT_BLOCK_REASON_APP_GROUP_DEFAULT);
ASSERT_EQ(blockReason, FORT_BLOCK_REASON_FILTER_MODE);
ASSERT_EQ(DriverCommon::confAppPeriodBits(data, 0, 0), 0x01);
ASSERT_EQ(DriverCommon::confAppPeriodBits(data, 12, 0), 0);

View File

@ -184,8 +184,8 @@ QString ConnListModel::blockReasonText(const ConnRow &connRow)
return tr("Programs logic");
case FORT_BLOCK_REASON_APP_GROUP_FOUND:
return tr("App. Group logic");
case FORT_BLOCK_REASON_APP_GROUP_DEFAULT:
return tr("App. Group default logic");
case FORT_BLOCK_REASON_FILTER_MODE:
return tr("Filter Mode logic");
default:
return tr("Unknown");
}
@ -203,7 +203,7 @@ QString ConnListModel::connIconPath(const ConnRow &connRow)
return ":/icons/application.png";
case FORT_BLOCK_REASON_APP_GROUP_FOUND:
return ":/icons/application_double.png";
case FORT_BLOCK_REASON_APP_GROUP_DEFAULT:
case FORT_BLOCK_REASON_FILTER_MODE:
default:
return ":/icons/deny.png";
}