代码拉取完成,页面将自动刷新
同步操作将从 OpenCloudOS Stream/dbus-broker 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From fedceff76af876d3069d4df2eedd0a974d16c3ff Mon Sep 17 00:00:00 2001
From: David Rheinsberg <david@readahead.eu>
Date: Thu, 1 Aug 2024 14:58:12 +0200
Subject: [PATCH] launch/policy: deallocate unused records during import
When records are imported, but never linked to any policy list, we
currently leak the records. Fix this and properly deallocate the records
in those cases.
Note that this only happens when invalid uids/gids are specified, which
is not common for production systems.
Reported-by: Evgeny Vereshchagin <evvers@ya.ru>
Reported-by: Frantisek Sumsal <frantisek@sumsal.cz>
Signed-off-by: David Rheinsberg <david@readahead.eu>
---
src/launch/policy.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/launch/policy.c b/src/launch/policy.c
index a72cb606..803336fc 100644
--- a/src/launch/policy.c
+++ b/src/launch/policy.c
@@ -405,7 +405,8 @@ static int policy_import_own(Policy *policy, ConfigNode *cnode) {
c_list_link_tail(&policy->default_entries.own_list, &record->link);
}
- record = NULL;
+ if (c_list_is_linked(&record->link))
+ record = NULL;
return 0;
}
@@ -497,7 +498,8 @@ static int policy_import_send(Policy *policy, ConfigNode *cnode) {
c_list_link_tail(&policy->default_entries.send_list, &record->link);
}
- record = NULL;
+ if (c_list_is_linked(&record->link))
+ record = NULL;
return 0;
}
@@ -589,7 +591,8 @@ static int policy_import_recv(Policy *policy, ConfigNode *cnode) {
c_list_link_tail(&policy->default_entries.recv_list, &record->link);
}
- record = NULL;
+ if (c_list_is_linked(&record->link))
+ record = NULL;
return 0;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。