mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
s4:dsdb:tests: Remove unused variables
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
5a19ea9bce
commit
178a7ed8a9
@ -229,7 +229,6 @@ name: """ + object_name + """
|
||||
self.assertTrue("replPropertyMetaData" in obj_res[0])
|
||||
val = obj_res[0]["replPropertyMetaData"][0]
|
||||
repl = ndr_unpack(drsblobs.replPropertyMetaDataBlob, val)
|
||||
obj = repl.ctr
|
||||
|
||||
# Windows 2000 functional level won't have this. It is too
|
||||
# hard to work it out from the prefixmap however, so we skip
|
||||
@ -306,7 +305,6 @@ instanceType: 4
|
||||
"""Testing creating a duplicate attribute"""
|
||||
rand = str(random.randint(1, 100000))
|
||||
attr_name = "test-Attr" + time.strftime("%s", time.gmtime()) + "-" + rand
|
||||
attr_ldap_display_name = attr_name.replace("-", "")
|
||||
attributeID = "1.3.6.1.4.1.7165.4.6.1.6.2." + rand
|
||||
ldif = """
|
||||
dn: CN=%s,%s""" % (attr_name, self.schema_dn) + """
|
||||
@ -349,7 +347,6 @@ systemOnly: FALSE
|
||||
"""Testing creating a duplicate attribute and class"""
|
||||
rand = str(random.randint(1, 100000))
|
||||
attr_name = "test-Attr" + time.strftime("%s", time.gmtime()) + "-" + rand
|
||||
attr_ldap_display_name = attr_name.replace("-", "")
|
||||
attributeID = "1.3.6.1.4.1.7165.4.6.1.6.3." + rand
|
||||
ldif = """
|
||||
dn: CN=%s,%s""" % (attr_name, self.schema_dn) + """
|
||||
@ -393,7 +390,6 @@ systemOnly: FALSE
|
||||
"""Testing creating a duplicate attribute"""
|
||||
rand = str(random.randint(1, 100000))
|
||||
attr_name = "test-Attr" + time.strftime("%s", time.gmtime()) + "-" + rand
|
||||
attr_ldap_display_name = attr_name.replace("-", "")
|
||||
attributeID = "1.3.6.1.4.1.7165.4.6.1.6.4." + rand
|
||||
ldif = """
|
||||
dn: CN=%s,%s""" % (attr_name, self.schema_dn) + """
|
||||
|
@ -571,7 +571,6 @@ class OwnerGroupDescriptorTests(DescriptorTests):
|
||||
delete_force(self.ldb_admin, object_dn)
|
||||
_ldb.newuser("test_domain_user1", "samba123@",
|
||||
userou="OU=test_domain_ou1", sd=tmp_desc, setpassword=False)
|
||||
desc = self.sd_utils.read_sd_on_dn(object_dn)
|
||||
desc_sddl = self.sd_utils.get_sd_as_sddl(object_dn)
|
||||
res = re.search("(O:.*G:.*?)D:", desc_sddl).group(1)
|
||||
self.assertEqual(self.results[self.DS_BEHAVIOR][self._testMethodName[5:]] % str(user_sid), res)
|
||||
@ -598,7 +597,6 @@ class OwnerGroupDescriptorTests(DescriptorTests):
|
||||
delete_force(self.ldb_admin, object_dn)
|
||||
_ldb.newuser("test_domain_user1", "samba123@",
|
||||
userou="OU=test_domain_ou1", sd=tmp_desc, setpassword=False)
|
||||
desc = self.sd_utils.read_sd_on_dn(object_dn)
|
||||
desc_sddl = self.sd_utils.get_sd_as_sddl(object_dn)
|
||||
res = re.search("(O:.*G:.*?)D:", desc_sddl).group(1)
|
||||
self.assertEqual(self.results[self.DS_BEHAVIOR][self._testMethodName[5:]] % str(user_sid), res)
|
||||
@ -697,13 +695,12 @@ class OwnerGroupDescriptorTests(DescriptorTests):
|
||||
# Open Ldb connection with the tested user
|
||||
_ldb = self.get_ldb_connection(user_name, "samba123@")
|
||||
# Change Schema partition descriptor
|
||||
user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name))
|
||||
mod = "(A;CI;WDCC;;;AU)"
|
||||
self.sd_utils.dacl_add_ace(self.schema_dn, mod)
|
||||
# Create example Schema class
|
||||
try:
|
||||
class_dn = self.create_schema_class(_ldb)
|
||||
except LdbError as e3:
|
||||
except LdbError:
|
||||
self.fail()
|
||||
desc_sddl = self.sd_utils.get_sd_as_sddl(class_dn)
|
||||
res = re.search("(O:.*G:.*?)D:", desc_sddl).group(1)
|
||||
@ -998,7 +995,7 @@ class OwnerGroupDescriptorTests(DescriptorTests):
|
||||
delete_force(self.ldb_admin, object_dn)
|
||||
try:
|
||||
self.create_configuration_specifier(_ldb, object_dn)
|
||||
except LdbError as e3:
|
||||
except LdbError:
|
||||
self.fail()
|
||||
desc_sddl = self.sd_utils.get_sd_as_sddl(object_dn)
|
||||
res = re.search("(O:.*G:.*?)D:", desc_sddl).group(1)
|
||||
@ -1140,7 +1137,7 @@ class OwnerGroupDescriptorTests(DescriptorTests):
|
||||
desc_sddl = "O:%sG:DAD:(A;;RP;;;DU)" % str(user_sid)
|
||||
try:
|
||||
self.create_configuration_specifier(_ldb, object_dn, desc_sddl)
|
||||
except LdbError as e3:
|
||||
except LdbError:
|
||||
self.fail()
|
||||
desc_sddl = self.sd_utils.get_sd_as_sddl(object_dn)
|
||||
res = re.search("(O:.*G:.*?)D:", desc_sddl).group(1)
|
||||
@ -1166,7 +1163,7 @@ class OwnerGroupDescriptorTests(DescriptorTests):
|
||||
desc_sddl = "O:%sG:DAD:(A;;RP;;;DU)" % str(user_sid)
|
||||
try:
|
||||
self.create_configuration_specifier(_ldb, object_dn, desc_sddl)
|
||||
except LdbError as e3:
|
||||
except LdbError:
|
||||
self.fail()
|
||||
desc_sddl = self.sd_utils.get_sd_as_sddl(object_dn)
|
||||
res = re.search("(O:.*G:.*?)D:", desc_sddl).group(1)
|
||||
|
Loading…
Reference in New Issue
Block a user