代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/samba 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 87ff4f57bf7a1980f2f6299115e35ab12483a150 Mon Sep 17 00:00:00 2001
From: Andrew Bartlett <[email protected]>
Date: Mon, 7 Aug 2023 13:15:40 +1200
Subject: [PATCH 18/28] CVE-2023-4154 dsdb/tests: Use self.addCleanup() and
delete_force()
Thie helps ensure this test is reliable even in spite of errors while
running.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15424
Signed-off-by: Andrew Bartlett <[email protected]>
Conflict: NA
Reference: https://download.samba.org/pub/samba/patches/security/samba-4.18.8-security-2023-10-10.patch
[PATCH 18/28] CVE-2023-4154 dsdb/tests: Use self.addCleanup() and
delete_force()
---
source4/dsdb/tests/python/confidential_attr.py | 6 ++----
source4/dsdb/tests/python/dirsync.py | 6 +-----
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/source4/dsdb/tests/python/confidential_attr.py b/source4/dsdb/tests/python/confidential_attr.py
index 8ca56bd1023..3997848f8f9 100755
--- a/source4/dsdb/tests/python/confidential_attr.py
+++ b/source4/dsdb/tests/python/confidential_attr.py
@@ -98,7 +98,9 @@ class ConfidentialAttrCommon(samba.tests.TestCase):
userou = "OU=conf-attr-test"
self.ou = "{0},{1}".format(userou, self.base_dn)
+ samba.tests.delete_force(self.ldb_admin, self.ou, controls=['tree_delete:1'])
self.ldb_admin.create_ou(self.ou)
+ self.addCleanup(samba.tests.delete_force, self.ldb_admin, self.ou, controls=['tree_delete:1'])
# use a common username prefix, so we can use sAMAccountName=CATC-* as
# a search filter to only return the users we're interested in
@@ -139,10 +141,6 @@ class ConfidentialAttrCommon(samba.tests.TestCase):
"{0} searchFlags already {1}".format(self.conf_attr,
search_flags))
- def tearDown(self):
- super(ConfidentialAttrCommon, self).tearDown()
- self.ldb_admin.delete(self.ou, ["tree_delete:1"])
-
def add_attr(self, dn, attr, value):
m = Message()
m.dn = Dn(self.ldb_admin, dn)
diff --git a/source4/dsdb/tests/python/dirsync.py b/source4/dsdb/tests/python/dirsync.py
index ad136b7efee..e06b85bc749 100755
--- a/source4/dsdb/tests/python/dirsync.py
+++ b/source4/dsdb/tests/python/dirsync.py
@@ -137,10 +137,6 @@ class SimpleDirsyncTests(DirsyncBaseTests):
if self.ouname:
delete_force(self.ldb_admin, self.ouname)
self.sd_utils.modify_sd_on_dn(self.base_dn, self.desc_sddl)
- try:
- self.ldb_admin.deletegroup("testgroup")
- except Exception:
- pass
# def test_dirsync_errors(self):
@@ -499,6 +495,7 @@ class SimpleDirsyncTests(DirsyncBaseTests):
self.assertEqual(len(res[0].get("member")), size)
self.ldb_admin.newgroup("testgroup")
+ self.addCleanup(self.ldb_admin.deletegroup, "testgroup")
self.ldb_admin.add_remove_group_members("testgroup", [self.simple_user],
add_members_operation=True)
@@ -537,7 +534,6 @@ class SimpleDirsyncTests(DirsyncBaseTests):
attrs=["member"],
controls=[control1])
- self.ldb_admin.deletegroup("testgroup")
self.assertEqual(len(res[0].get("member")), 0)
def test_dirsync_deleted_items(self):
--
2.34.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。