1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

CVE-2020-25722 selftest: Adapt sam.py test to userAccountControl/objectclass restrictions

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14753

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
Andrew Bartlett 2021-10-21 15:19:19 +13:00 committed by Jule Anger
parent 6c03fb656d
commit 66986eefc6
2 changed files with 3 additions and 5 deletions

View File

@ -3,8 +3,6 @@
#
# All these tests need to be fixed and the entries here removed
^samba4.sam.python\(.*\).__main__.SamTests.test_userAccountControl_computer_modify
^samba4.sam.python\(.*\).__main__.SamTests.test_userAccountControl_user_modify
^samba4.sam.python\(fl2008r2dc\).__main__.SamTests.test_users_groups\(fl2008r2dc\)
^samba4.ldap.python\(ad_dc_default\).__main__.BasicTests.test_all\(ad_dc_default\)
^samba4.sam.python\(ad_dc_default\).__main__.SamTests.test_users_groups\(ad_dc_default\)

View File

@ -2134,7 +2134,7 @@ class SamTests(samba.tests.TestCase):
self.fail()
except LdbError as e67:
(num, _) = e67.args
self.assertEqual(num, ERR_UNWILLING_TO_PERFORM)
self.assertEqual(num, ERR_OBJECT_CLASS_VIOLATION)
m = Message()
m.dn = Dn(ldb, "cn=ldaptestuser,cn=users," + self.base_dn)
@ -2153,7 +2153,7 @@ class SamTests(samba.tests.TestCase):
self.fail()
except LdbError as e68:
(num, _) = e68.args
self.assertEqual(num, ERR_UNWILLING_TO_PERFORM)
self.assertEqual(num, ERR_OBJECT_CLASS_VIOLATION)
res1 = ldb.search("cn=ldaptestuser,cn=users," + self.base_dn,
scope=SCOPE_BASE, attrs=["sAMAccountType"])
@ -2501,7 +2501,7 @@ class SamTests(samba.tests.TestCase):
self.fail()
except LdbError as e76:
(num, _) = e76.args
self.assertEqual(num, ERR_INSUFFICIENT_ACCESS_RIGHTS)
self.assertEqual(num, ERR_OBJECT_CLASS_VIOLATION)
# "primaryGroupID" does not change if account type remains the same