]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
CVE-2020-25722 selftest: Adjust sam.py test_userAccountControl_computer_add_trust...
authorAndrew Bartlett <abartlet@samba.org>
Thu, 21 Oct 2021 02:06:14 +0000 (15:06 +1300)
committerJule Anger <janger@samba.org>
Mon, 8 Nov 2021 09:52:10 +0000 (10:52 +0100)
We now enforce that a trust account must be a user.

These can not be added over LDAP anyway, and our C
code in the RPC server gets this right in any case.

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>
selftest/knownfail.d/uac_objectclass_restrict
source4/dsdb/tests/python/sam.py

index ac7befffb1b423840545073bff719080ac6de51b..0fc2f4d47a21086db39e63bc1854acfcef5f0ff3 100644 (file)
@@ -4,7 +4,6 @@
 # All these tests need to be fixed and the entries here removed
 
 ^samba4.sam.python\(.*\).__main__.SamTests.test_userAccountControl_computer_add_0_uac
-^samba4.sam.python\(.*\).__main__.SamTests.test_userAccountControl_computer_add_trust
 ^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\)
index 077a1a86e90be7bbd64ac7bf27277e5eec84e33f..ae83a136785f794a78f8400b521f4b6b2736b207 100755 (executable)
@@ -2299,7 +2299,7 @@ class SamTests(samba.tests.TestCase):
             self.fail()
         except LdbError as e72:
             (num, _) = e72.args
-            self.assertEqual(num, ERR_INSUFFICIENT_ACCESS_RIGHTS)
+            self.assertEqual(num, ERR_OBJECT_CLASS_VIOLATION)
         delete_force(self.ldb, "cn=ldaptestcomputer,cn=computers," + self.base_dn)
 
     def test_userAccountControl_computer_modify(self):