entry.len = len;
entry.rlist = rules;
- // check if we have only ALLOW actions on the rules list
- for (auto &it : rules) {
- if (it.action != PRIV_GUARD_DLP_ACTION_ALLOW) {
- // if we have any rule different from ALLOW we need to parse now
- res = ParseAndLogLeakNow(entry);
- break;
- }
- }
+ /** This verification is not necessary in current implementation
+ * as it supports only ALLOW action.
+ * // check if we have only ALLOW actions on the rules list
+ * for (auto &it : rules) {
+ * if (it.action != PRIV_GUARD_DLP_ACTION_ALLOW) {
+ * // if we have any rule different from ALLOW we need to parse now
+ * res = ParseAndLogLeakNow(entry);
+ * break;
+ * }
+ *}
+ */
if (!entry.rlist.empty() || !entry.llist.empty()) {
// add entry to the m_logQueue to be processed when the thread awakes
clock_gettime(CLOCK_REALTIME, &tp_before);
#endif
current_rules_list rules;
- PgDlpResult res;
DlpRulesManager *pRules = DlpRulesManager::getInstance();
DlpLogsManager *pLogs = DlpLogsManager::getInstance();
/* return DENY if called with NULL values or zero len */
if (hostname == NULL || mem == NULL || len == 0) {
PG_LOGE("DLP check leak received and empty request, message denied");
- return PRIV_GUARD_DLP_RESULT_DENY;
+ return PRIV_GUARD_DLP_RESULT_ALLOW;
}
/* get cached rules from server */
return PRIV_GUARD_DLP_RESULT_ALLOW;
}
- res = pLogs->ParseAndLogLeak(hostname, mem, len, rules);
+ pLogs->ParseAndLogLeak(hostname, mem, len, rules);
#ifdef PERF_TEST
clock_gettime(CLOCK_REALTIME, &tp_after);
PG_LOGD("DLP check time: %ld us", interval);
#endif
-#ifdef _PRIVACY_GUARD_DEBUG
- if (res == PRIV_GUARD_DLP_RESULT_ALLOW) {
- PG_LOGD("Packet allowed");
- } else {
- PG_LOGD("Packet denied");
- }
-#endif
-
- return res;
+ return PRIV_GUARD_DLP_RESULT_ALLOW;
}